libidav/resource.c

changeset 113
dde28a806552
parent 108
77254bd6dccb
--- a/libidav/resource.c	Sun Oct 19 21:20:08 2025 +0200
+++ b/libidav/resource.c	Mon Nov 10 21:52:51 2025 +0100
@@ -37,7 +37,6 @@
 #include "methods.h"
 #include "crypto.h"
 #include <cx/buffer.h>
-#include <cx/utils.h>
 #include <cx/hash_map.h>
 #include <cx/printf.h>
 #include <cx/mempool.h>
@@ -835,7 +834,7 @@
     HashStream *s = stream;
     if(offset == 0 && whence == SEEK_SET) {
         unsigned char buf[DAV_SHA256_DIGEST_LENGTH];
-        dav_sha256_final(s->sha, buf);
+        dav_sha256_final_free(s->sha, buf);
         s->sha = NULL;
     } else {
         s->error = 1;
@@ -938,7 +937,7 @@
                     data->length);
             
             if(hstr.sha) {
-                dav_sha256_final(hstr.sha, (unsigned char*)data->hash);
+                dav_sha256_final_free(hstr.sha, (unsigned char*)data->hash);
                 char *hash = util_hexstr((unsigned char*)data->hash, 32);
                 dav_set_string_property_ns(res, DAV_NS, "content-hash", hash);
                 free(hash);
@@ -1599,7 +1598,7 @@
             property->value = n->children ? dav_convert_xml(sn, n->children) : NULL;
             
             cxmutstr propkey = dav_property_key(property->ns->name, property->name);
-            cxMapPut(map, cx_hash_key_cxstr(propkey), property);
+            cxMapPut(map, propkey, property);
             cx_strfree(&propkey);
         }
         n = n->next;

mercurial