src/server/webdav/multistatus.c

changeset 490
d218607f5a7e
parent 484
c036a8b242a8
child 507
4b3ac9249394
--- a/src/server/webdav/multistatus.c	Sat Mar 25 17:18:51 2023 +0100
+++ b/src/server/webdav/multistatus.c	Fri May 05 18:02:11 2023 +0200
@@ -52,7 +52,7 @@
     ms->response.addresource = multistatus_addresource;
     ms->sn = sn;
     ms->rq = rq;
-    ms->namespaces = cxHashMapCreate(pool_allocator(sn->pool), 8);
+    ms->namespaces = cxHashMapCreate(pool_allocator(sn->pool), CX_STORE_POINTERS, 8);
     ms->proppatch = FALSE;
     if(!ms->namespaces) {
         return NULL;
@@ -74,7 +74,7 @@
     cx_foreach(CxMapEntry*, entry, i) {
         WSNamespace *ns = entry->value;
         writer_put_lit(out, " xmlns:");
-        writer_put    (out, entry->key->data.str, entry->key->len);
+        writer_put    (out, entry->key->data, entry->key->len);
         writer_put_lit(out, "=\"");
         writer_put_str(out, (char*)ns->href);
         writer_put_lit(out, "\"");
@@ -355,7 +355,7 @@
     res->resource.addproperty = msresponse_addproperty;
     res->resource.close = msresponse_close;
     
-    res->properties = cxHashMapCreate(pool_allocator(ms->sn->pool), 32);
+    res->properties = cxHashMapCreate(pool_allocator(ms->sn->pool), CX_STORE_POINTERS, 32);
     if(!res->properties) {
         return NULL;
     }
@@ -497,13 +497,13 @@
     CxAllocator *a = pool_allocator(sn->pool);
     CxHashKey key = ms_property_key(a, property->namespace->href, property->name);
     if(cxMapGet(response->properties, key)) {
-        cxFree(a, key.data.bytes);
+        cxFree(a, (void*)key.data);
         return 0;
     }
     if(cxMapPut(response->properties, key, property)) {
         return 1; // OOM
     }
-    cxFree(a, key.data.bytes);
+    cxFree(a, (void*)key.data);
     
     // list of namespace definitions for this property
     WebdavNSList *nsdef_begin = NULL;

mercurial