libidav/webdav.c

changeset 205
bf756f6c3581
parent 185
cd42cccee550
child 223
cbbdf207e67e
equal deleted inserted replaced
204:4f0207044837 205:bf756f6c3581
291 291
292 //fwrite(rqbuf->space, 1, rqbuf->size, stdout); 292 //fwrite(rqbuf->space, 1, rqbuf->size, stdout);
293 //printf("\n"); 293 //printf("\n");
294 294
295 CURLcode ret = do_propfind_request(handle, rqbuf, rpbuf); 295 CURLcode ret = do_propfind_request(handle, rqbuf, rpbuf);
296 int status = 0; 296 long status = 0;
297 curl_easy_getinfo (handle, CURLINFO_RESPONSE_CODE, &status); 297 curl_easy_getinfo (handle, CURLINFO_RESPONSE_CODE, &status);
298 if(ret == CURLE_OK && status == 207) { 298 if(ret == CURLE_OK && status == 207) {
299 //printf("response\n%s\n", rpbuf->space); 299 //printf("response\n%s\n", rpbuf->space);
300 // TODO: use PropfindParser 300 // TODO: use PropfindParser
301 resource = parse_propfind_response(sn, resource, rpbuf); 301 resource = parse_propfind_response(sn, resource, rpbuf);
323 323
324 UcxBuffer *rpbuf = ucx_buffer_new(NULL, 4096, UCX_BUFFER_AUTOEXTEND); 324 UcxBuffer *rpbuf = ucx_buffer_new(NULL, 4096, UCX_BUFFER_AUTOEXTEND);
325 DavResource *resource = root; 325 DavResource *resource = root;
326 CURLcode ret = do_propfind_request(handle, rqbuf, rpbuf); 326 CURLcode ret = do_propfind_request(handle, rqbuf, rpbuf);
327 int status = 0; 327 int status = 0;
328 int error = 0; 328 long error = 0;
329 curl_easy_getinfo (handle, CURLINFO_RESPONSE_CODE, &status); 329 curl_easy_getinfo (handle, CURLINFO_RESPONSE_CODE, &status);
330 if(ret == CURLE_OK && status == 207) { 330 if(ret == CURLE_OK && status == 207) {
331 //printf("response\n%s\n", rpbuf->space); 331 //printf("response\n%s\n", rpbuf->space);
332 resource = parse_propfind_response(sn, resource, rpbuf); 332 resource = parse_propfind_response(sn, resource, rpbuf);
333 sn->error = DAV_OK; 333 sn->error = DAV_OK;

mercurial