420 } |
419 } |
421 |
420 |
422 |
421 |
423 int dav_load(DavResource *res) { |
422 int dav_load(DavResource *res) { |
424 UcxBuffer *rqbuf = create_allprop_propfind_request(); |
423 UcxBuffer *rqbuf = create_allprop_propfind_request(); |
425 int ret = dav_propfind(res->session, res, rqbuf, NULL, 0); |
424 int ret = dav_propfind(res->session, res, rqbuf); |
426 ucx_buffer_free(rqbuf); |
425 ucx_buffer_free(rqbuf); |
427 return ret; |
426 return ret; |
428 } |
427 } |
429 |
428 |
430 int dav_store(DavResource *res) { |
429 int dav_store(DavResource *res) { |
658 // if the session has encrypted file names, add crypto infos |
657 // if the session has encrypted file names, add crypto infos |
659 resource_add_crypto_info(sn, res->href, res->name); // TODO: check return type |
658 resource_add_crypto_info(sn, res->href, res->name); // TODO: check return type |
660 |
659 |
661 // do a minimal propfind request |
660 // do a minimal propfind request |
662 UcxBuffer *rqbuf = create_propfind_request(sn, NULL); |
661 UcxBuffer *rqbuf = create_propfind_request(sn, NULL); |
663 int ret = dav_propfind(sn, res, rqbuf, NULL, 0); |
662 int ret = dav_propfind(sn, res, rqbuf); |
664 ucx_buffer_free(rqbuf); |
663 ucx_buffer_free(rqbuf); |
665 return ret; |
664 return ret; |
666 } else { |
665 } else { |
667 dav_session_set_error(sn, code, s); |
666 dav_session_set_error(sn, code, s); |
668 return 1; |
667 return 1; |