libidav/resource.c

changeset 822
f9e40f5c6daf
parent 816
839fefbdedc7
--- a/libidav/resource.c	Fri May 24 00:27:40 2024 +0200
+++ b/libidav/resource.c	Sun Jul 21 23:19:40 2024 +0200
@@ -606,11 +606,16 @@
     return property;
 }
 
-void dav_set_string_property(DavResource *res, char *name, char *value) {
+int dav_set_string_property(DavResource *res, char *name, char *value) {
     char *pns;
     char *pname;
     dav_get_property_namespace_str(res->session->context, name, &pns, &pname);
+    if(!pns) {
+        res->session->errorstr = "Property namespace not found";
+        return 1;
+    }
     dav_set_string_property_ns(res, pns, pname, value);
+    return 0;
 }
 
 static int add2propertylist(const CxAllocator *a, CxList **list, DavProperty *property) {

mercurial