libidav/resource.c

changeset 822
f9e40f5c6daf
parent 816
839fefbdedc7
equal deleted inserted replaced
821:9b1e998eeac6 822:f9e40f5c6daf
604 property->ns = namespace; 604 property->ns = namespace;
605 605
606 return property; 606 return property;
607 } 607 }
608 608
609 void dav_set_string_property(DavResource *res, char *name, char *value) { 609 int dav_set_string_property(DavResource *res, char *name, char *value) {
610 char *pns; 610 char *pns;
611 char *pname; 611 char *pname;
612 dav_get_property_namespace_str(res->session->context, name, &pns, &pname); 612 dav_get_property_namespace_str(res->session->context, name, &pns, &pname);
613 if(!pns) {
614 res->session->errorstr = "Property namespace not found";
615 return 1;
616 }
613 dav_set_string_property_ns(res, pns, pname, value); 617 dav_set_string_property_ns(res, pns, pname, value);
618 return 0;
614 } 619 }
615 620
616 static int add2propertylist(const CxAllocator *a, CxList **list, DavProperty *property) { 621 static int add2propertylist(const CxAllocator *a, CxList **list, DavProperty *property) {
617 if(!*list) { 622 if(!*list) {
618 CxList *newlist = cxLinkedListCreate(a, NULL, CX_STORE_POINTERS); 623 CxList *newlist = cxLinkedListCreate(a, NULL, CX_STORE_POINTERS);

mercurial