dav/sync.c

changeset 725
de3b2bb46492
parent 724
9c2f0072abed
child 734
b2cd82149116
equal deleted inserted replaced
724:9c2f0072abed 725:de3b2bb46492
2156 UCX_FOREACH(elm, removed_res) { 2156 UCX_FOREACH(elm, removed_res) {
2157 LocalResource *local = elm->data; 2157 LocalResource *local = elm->data;
2158 ucx_map_cstr_remove(db->resources, local->path); 2158 ucx_map_cstr_remove(db->resources, local->path);
2159 } 2159 }
2160 2160
2161 ls_new = ucx_list_sort(ls_new, (cmp_func)resource_pathlen_cmp, NULL); 2161 ls_new = ucx_list_sort(ls_new, (cmp_func)resource_path_cmp, NULL);
2162 ls_modified = ucx_list_sort(ls_modified, (cmp_func)resource_pathlen_cmp, NULL); 2162 ls_modified = ucx_list_sort(ls_modified, (cmp_func)resource_path_cmp, NULL);
2163 ls_conflict = ucx_list_sort(ls_conflict, (cmp_func)resource_pathlen_cmp, NULL); 2163 ls_conflict = ucx_list_sort(ls_conflict, (cmp_func)resource_path_cmp, NULL);
2164 ls_update = ucx_list_sort(ls_update, (cmp_func)resource_pathlen_cmp, NULL); 2164 ls_update = ucx_list_sort(ls_update, (cmp_func)resource_path_cmp, NULL);
2165 ls_delete = ucx_list_sort(ls_delete, (cmp_func)resource_pathlen_cmp, NULL); 2165 ls_delete = ucx_list_sort(ls_delete, (cmp_func)resource_path_cmp, NULL);
2166 ls_move = ucx_list_sort(ls_move, (cmp_func)resource_pathlen_cmp, NULL); 2166 ls_move = ucx_list_sort(ls_move, (cmp_func)resource_path_cmp, NULL);
2167 ls_copy = ucx_list_sort(ls_copy, (cmp_func)resource_pathlen_cmp, NULL); 2167 ls_copy = ucx_list_sort(ls_copy, (cmp_func)resource_path_cmp, NULL);
2168 ls_mkcol = ucx_list_sort(ls_mkcol, (cmp_func)resource_pathlen_cmp, NULL); 2168 ls_mkcol = ucx_list_sort(ls_mkcol, (cmp_func)resource_path_cmp, NULL);
2169 2169
2170 if(outgoing) { 2170 if(outgoing) {
2171 print_outgoing( 2171 print_outgoing(
2172 a, 2172 a,
2173 ls_new, 2173 ls_new,
3389 } else { 3389 } else {
3390 return 0; 3390 return 0;
3391 } 3391 }
3392 } 3392 }
3393 3393
3394 int resource_path_cmp(LocalResource *res1, LocalResource *res2, void *n) {
3395 return strcmp(res1->path, res2->path);
3396 }
3397
3398
3394 DavResource *versioning_simple_find(DavResource *res, const char *version) { 3399 DavResource *versioning_simple_find(DavResource *res, const char *version) {
3395 char *vcol_href = dav_get_string_property_ns(res, DAV_NS, VERSION_PATH_PROPERTY); 3400 char *vcol_href = dav_get_string_property_ns(res, DAV_NS, VERSION_PATH_PROPERTY);
3396 if(!vcol_href) { 3401 if(!vcol_href) {
3397 return NULL; 3402 return NULL;
3398 } 3403 }

mercurial