libidav/session.c

branch
ucx-3.1
changeset 816
839fefbdedc7
parent 806
673a803d2203
--- a/libidav/session.c	Sat Apr 20 13:01:58 2024 +0200
+++ b/libidav/session.c	Thu May 23 22:35:45 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