libidav/session.c

changeset 818
bc782cca0759
parent 816
839fefbdedc7
child 828
e082e5d7d75b
--- a/libidav/session.c	Thu May 23 23:19:06 2024 +0200
+++ b/libidav/session.c	Thu May 23 23:23:36 2024 +0200
@@ -31,8 +31,7 @@
 #include <string.h>
 
 #include <cx/buffer.h>
-#include <cx/utils.h>
-#include <cx/basic_mempool.h>
+#include <cx/mempool.h>
 #include <cx/hash_map.h>
 
 #include "utils.h"
@@ -636,16 +635,6 @@
     if(cxMapRemoveAndGet(locks->resource_locks, cx_hash_key_str(path))) {
         return;
     }
-    
-    CxMutIterator i = cxListMutIterator(locks->collection_locks);
-    int rm = 0;
-    cx_foreach(DavLock* , cl, i) {
-        if(rm) {
-            break;
-        }
-        if(cl == lock) {
-            cxIteratorFlagRemoval(i);
-            rm = 1;
-        }
-    }
+
+    cxListFindRemove(locks->collection_locks, lock);
 }

mercurial