Branch: Tag:

2018-03-27

2018-03-27 15:14:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>

WebDAV: Changed API for find_locks().

Instead of returning a multiset(DAVLock) it now returns
a mapping(string:DAVLock), where the mapping is indexed
on locktoken.

538:    // The above seems to imply that RFC 4918 9.6 applies    // to MOVE. We thus need to destroy any locks rooted    // on the moved resource. -  multiset(DAVLock) sub_locks = +  mapping(string:DAVLock) sub_locks =    module->find_locks(source, -1, 0, id); -  foreach(sub_locks||(<>);DAVLock lock;) { +  foreach(sub_locks||([]);;DAVLock lock) {    SIMPLE_TRACE_ENTER(module,    "MOVE: Unlocking %O...", lock);    mapping fail =
573:    // A server processing a successful DELETE request:    //    // MUST destroy locks rooted on the deleted resource -  multiset(DAVLock) sub_locks = +  mapping(string:DAVLock) sub_locks =    module->find_locks(path, -1, 0, id); -  foreach(sub_locks||(<>);DAVLock lock;) { +  foreach(sub_locks||([]);;DAVLock lock) {    SIMPLE_TRACE_ENTER(module,    "DELETE: Unlocking %O...", lock);    mapping fail =