464 int j = 0; |
464 int j = 0; |
465 while(webdav_plist_iterator_next(&i, &cur)) { |
465 while(webdav_plist_iterator_next(&i, &cur)) { |
466 WSNamespace *ns = cur->property->namespace; |
466 WSNamespace *ns = cur->property->namespace; |
467 if(ns) { |
467 if(ns) { |
468 CxHashKey pkey = webdav_property_key((const char*)ns->href, cur->property->name); |
468 CxHashKey pkey = webdav_property_key((const char*)ns->href, cur->property->name); |
|
469 if(!pkey.data) { |
|
470 return 1; |
|
471 } |
469 PgPropertyStoreExt *cfg_ext = cxMapGet(pgdav->repository->prop_ext, pkey); |
472 PgPropertyStoreExt *cfg_ext = cxMapGet(pgdav->repository->prop_ext, pkey); |
470 free(pkey.data.bytes); |
473 free((void*)pkey.data); |
471 if(cfg_ext) { |
474 if(cfg_ext) { |
472 PgPropfindExtCol extcol; |
475 PgPropfindExtCol extcol; |
473 extcol.ext = cfg_ext; |
476 extcol.ext = cfg_ext; |
474 extcol.field_num = -1; // get the field_num after the PQexec |
477 extcol.field_num = -1; // get the field_num after the PQexec |
475 ext[j++] = extcol; |
478 ext[j++] = extcol; |
905 } |
908 } |
906 |
909 |
907 |
910 |
908 static PgPropertyStoreExt* pg_proppatch_prop_get_ext(PgWebdavBackend *pgdav, WebdavProperty *property) { |
911 static PgPropertyStoreExt* pg_proppatch_prop_get_ext(PgWebdavBackend *pgdav, WebdavProperty *property) { |
909 CxHashKey pkey = webdav_property_key((const char*)property->namespace->href, property->name); |
912 CxHashKey pkey = webdav_property_key((const char*)property->namespace->href, property->name); |
|
913 if(!pkey.data) { |
|
914 return NULL; |
|
915 } |
910 PgPropertyStoreExt *ext = cxMapGet(pgdav->repository->prop_ext, pkey); |
916 PgPropertyStoreExt *ext = cxMapGet(pgdav->repository->prop_ext, pkey); |
911 free(pkey.data.bytes); |
917 free((void*)pkey.data); |
912 return ext; |
918 return ext; |
913 } |
919 } |
914 |
920 |
915 #define PG_PROPPATCH_EXT_SET 0 |
921 #define PG_PROPPATCH_EXT_SET 0 |
916 #define PG_PROPPATCH_EXT_REMOVE 1 |
922 #define PG_PROPPATCH_EXT_REMOVE 1 |