| 55 ms->namespaces = cxHashMapCreate(pool_allocator(sn->pool), CX_STORE_POINTERS, 8); |
55 ms->namespaces = cxHashMapCreate(pool_allocator(sn->pool), CX_STORE_POINTERS, 8); |
| 56 ms->proppatch = FALSE; |
56 ms->proppatch = FALSE; |
| 57 if(!ms->namespaces) { |
57 if(!ms->namespaces) { |
| 58 return NULL; |
58 return NULL; |
| 59 } |
59 } |
| 60 if(cxMapPut(ms->namespaces, cx_hash_key_str("D"), webdav_dav_namespace())) { |
60 if(cxMapPut(ms->namespaces, "D", webdav_dav_namespace())) { |
| 61 return NULL; |
61 return NULL; |
| 62 } |
62 } |
| 63 return ms; |
63 return ms; |
| 64 } |
64 } |
| 65 |
65 |
| 571 // add namespace of this property to the namespace map |
571 // add namespace of this property to the namespace map |
| 572 // the namespace map will be used for global namespace definitions |
572 // the namespace map will be used for global namespace definitions |
| 573 if(property->namespace->prefix) { |
573 if(property->namespace->prefix) { |
| 574 WSNamespace *ns = cxMapGet( |
574 WSNamespace *ns = cxMapGet( |
| 575 response->multistatus->namespaces, |
575 response->multistatus->namespaces, |
| 576 cx_hash_key_str((const char*)property->namespace->prefix)); |
576 property->namespace->prefix); |
| 577 if(!ns) { |
577 if(!ns) { |
| 578 // prefix is not in use -> we can add the namespace to the ns map |
578 // prefix is not in use -> we can add the namespace to the ns map |
| 579 int err = cxMapPut( |
579 int err = cxMapPut( |
| 580 response->multistatus->namespaces, |
580 response->multistatus->namespaces, |
| 581 cx_hash_key_str((const char*)property->namespace->prefix), |
581 (const char*)property->namespace->prefix, |
| 582 property->namespace); |
582 property->namespace); |
| 583 if(err) { |
583 if(err) { |
| 584 return 1; // OOM |
584 return 1; // OOM |
| 585 } |
585 } |
| 586 } else if( |
586 } else if( |