Fri, 17 Jan 2020 19:12:05 +0100
replace UcxList with WebdavPList in the multistatus object
--- a/src/server/test/webdav.c Fri Jan 17 19:08:19 2020 +0100 +++ b/src/server/test/webdav.c Fri Jan 17 19:12:05 2020 +0100 @@ -849,9 +849,9 @@ UCX_TEST_ASSERT(r->errors->next->next, "no third error code"); UCX_TEST_ASSERT(!r->errors->next->next->next, "too many error codes"); - UCX_TEST_ASSERT(ucx_list_size(r->errors->begin) == 2, "404 list size != 2"); - UCX_TEST_ASSERT(ucx_list_size(r->errors->next->begin) == 4, "403 list size != 4"); - UCX_TEST_ASSERT(ucx_list_size(r->errors->next->next->begin) == 1, "500 list size != 1"); + UCX_TEST_ASSERT(webdav_plist_size(r->errors->begin) == 2, "404 list size != 2"); + UCX_TEST_ASSERT(webdav_plist_size(r->errors->next->begin) == 4, "403 list size != 4"); + UCX_TEST_ASSERT(webdav_plist_size(r->errors->next->next->begin) == 1, "500 list size != 1"); // new resource for prop duplication tests r = (MSResponse*)ms->response.addresource((WebdavResponse*)ms, "/test"); @@ -867,7 +867,7 @@ r->resource.addproperty((WebdavResource*)r, &dp2, 404); UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp2 with different status should not work (1)"); if(r->errors) { - UCX_TEST_ASSERT(ucx_list_size(r->errors->begin) == 0, "dp1: error list not empty"); + UCX_TEST_ASSERT(webdav_plist_size(r->errors->begin) == 0, "dp1: error list not empty"); } r->resource.addproperty((WebdavResource*)r, &dp3, 200);
--- a/src/server/webdav/multistatus.c Fri Jan 17 19:08:19 2020 +0100 +++ b/src/server/webdav/multistatus.c Fri Jan 17 19:12:05 2020 +0100 @@ -214,14 +214,9 @@ } // we have the list -> add the new element - UcxList *newlistelm = ucx_list_append_a(a, errlist->end, property); - if(!newlistelm) { + if(webdav_plist_add(pool, &errlist->begin, &errlist->end, property)) { return 1; } - errlist->end = newlistelm; - if(!errlist->begin) { - errlist->begin = newlistelm; - } return 0; }