# HG changeset patch # User Olaf Wintermann # Date 1732812793 -3600 # Node ID bbe2925eb5906977d44861055c0a9e31230a6ac0 # Parent c949c6ab5346437d4a898d7563fd51869999b7de revert property set/remove list changes diff -r c949c6ab5346 -r bbe2925eb590 libidav/methods.c --- a/libidav/methods.c Thu Nov 28 17:20:19 2024 +0100 +++ b/libidav/methods.c Thu Nov 28 17:53:13 2024 +0100 @@ -836,7 +836,7 @@ { char prefix[8]; int pfxnum = 0; - if (cxListSize(data->set) > 0) { + if (data->set && cxListSize(data->set) > 0) { CxIterator i = cxListIterator(data->set); cx_foreach(DavProperty*, p, i) { if (strcmp(p->ns->name, "DAV:")) { @@ -845,7 +845,7 @@ } } } - if (cxListSize(data->remove) > 0) { + if (data->remove && cxListSize(data->remove) > 0) { CxIterator i = cxListIterator(data->remove); cx_foreach(DavProperty*, p, i) { if (strcmp(p->ns->name, "DAV:")) { diff -r c949c6ab5346 -r bbe2925eb590 libidav/resource.c --- a/libidav/resource.c Thu Nov 28 17:20:19 2024 +0100 +++ b/libidav/resource.c Thu Nov 28 17:53:13 2024 +0100 @@ -1043,7 +1043,7 @@ // store properties int r = 0; sn->error = DAV_OK; - if(cxListSize(data->set) > 0 || cxListSize(data->remove) > 0) { + if(data->set || data->remove > 0) { CxBuffer *request = create_proppatch_request(data); CxBuffer *response = cxBufferCreate(NULL, 1024, cxDefaultAllocator, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); //printf("request:\n%.*s\n\n", request->pos, request->space);