314 |
314 |
315 |
315 |
316 int dav_propfind(DavSession *sn, DavResource *root, UcxBuffer *rqbuf) { |
316 int dav_propfind(DavSession *sn, DavResource *root, UcxBuffer *rqbuf) { |
317 // clean resource properties |
317 // clean resource properties |
318 DavResourceData *data = root->data; |
318 DavResourceData *data = root->data; |
319 size_t pcount = data->properties->count; |
319 ucx_map_clear(data->properties); |
320 if(pcount > 0) { |
|
321 UcxKey key; |
|
322 void *value; |
|
323 UcxMapIterator i = ucx_map_iterator(data->properties); |
|
324 UcxKey mkeys[pcount]; |
|
325 int index = 0; |
|
326 UCX_MAP_FOREACH(key, value, i) { |
|
327 mkeys[index] = key; |
|
328 index++; |
|
329 } |
|
330 for(int j=0;j<index;j++) { |
|
331 ucx_map_remove(data->properties, mkeys[j]); |
|
332 } |
|
333 } |
|
334 |
320 |
335 CURL *handle = sn->handle; |
321 CURL *handle = sn->handle; |
336 util_set_url(sn, dav_resource_get_href(root)); |
322 util_set_url(sn, dav_resource_get_href(root)); |
337 |
323 |
338 UcxBuffer *rpbuf = ucx_buffer_new(NULL, 4096, UCX_BUFFER_AUTOEXTEND); |
324 UcxBuffer *rpbuf = ucx_buffer_new(NULL, 4096, UCX_BUFFER_AUTOEXTEND); |