Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:981:
//! @[unregister_lock()] void unlock_path(string path, RequestID id) { // Common case. if (!sizeof(file_locks) && !sizeof(prefix_locks)) return 0; TRACE_ENTER(sprintf("unlock_path(%O, %O)", path, id), this); string rsc = resource_id(path, id);
+
// NB: The following code leaves dead locks in conf->active_locks!
+
foreach(file_locks; string prefix; mapping(mixed:DAVLock) sub_locks) { if (has_prefix(prefix, rsc)) { TRACE_ENTER(sprintf("Unlocking %d locks for path %O...", sizeof(sub_locks), prefix), this); m_delete(file_locks, prefix); TRACE_LEAVE(""); } } foreach(prefix_locks; string prefix; mapping(mixed:DAVLock) sub_locks) {
Roxen.git/server/base_server/module.pike:1077:
if (lock->recursive) { if (id) { removed_lock = m_delete(prefix_locks[path], auth_user); } else { foreach(prefix_locks[path]||([]); mixed user; DAVLock l) { if (l == lock) { removed_lock = m_delete(prefix_locks[path], user); } } }
-
if (!sizeof (prefix_locks[path])) m_delete
(prefix_locks, path);
+
if (
prefix_locks[path] &&
!sizeof (prefix_locks[path]))
{
+
m_delete(prefix_locks, path);
}
-
+
}
else if (file_locks[path]) { if (id) { removed_lock = m_delete (file_locks[path], auth_user); } else { foreach(file_locks[path]||([]); mixed user; DAVLock l) { if (l == lock) { removed_lock = m_delete(file_locks[path], user); } } }