235 return stack; |
235 return stack; |
236 } |
236 } |
237 |
237 |
238 DavResource* dav_query_get(DavSession *sn, DavGetQuery *query) { |
238 DavResource* dav_query_get(DavSession *sn, DavGetQuery *query) { |
239 char *path; |
239 char *path; |
240 int depth = 0; |
240 int depth = query->depth; |
241 /* |
241 /* |
242 if(parse_path_query(query->from, &path, &depth)) { |
242 if(parse_path_query(query->from, &path, &depth)) { |
243 sn->error = DAV_ERROR; |
243 sn->error = DAV_ERROR; |
244 return NULL; |
244 return NULL; |
245 } |
245 } |
264 free(path); |
264 free(path); |
265 if(dav_propfind(sn, resource, rqbuf, query->condition, query->condlen)) { |
265 if(dav_propfind(sn, resource, rqbuf, query->condition, query->condlen)) { |
266 dav_resource_free(resource); |
266 dav_resource_free(resource); |
267 resource = NULL; |
267 resource = NULL; |
268 } |
268 } |
269 ucx_buffer_free(rqbuf); |
|
270 |
269 |
271 int error = 0; |
270 int error = 0; |
272 if(resource && depth == -1) { |
271 if(resource && depth == -1) { |
273 UcxList *stack = NULL; // stack with DavResource* elements |
272 UcxList *stack = NULL; // stack with DavResource* elements |
274 stack = propfind_stack_push(stack, resource->children); |
273 stack = propfind_stack_push(stack, resource->children); |