src/server/webdav/requestparser.c

branch
webdav
changeset 212
d7e7ea9c6bc6
parent 211
2160585200ac
child 216
ce2866ec97f6
equal deleted inserted replaced
211:2160585200ac 212:d7e7ea9c6bc6
75 pool_handle_t *pool, 75 pool_handle_t *pool,
76 WSNamespace *ns, 76 WSNamespace *ns,
77 const char *name) 77 const char *name)
78 { 78 {
79 WebdavProperty *prop = pool_malloc(pool, sizeof(WebdavProperty)); 79 WebdavProperty *prop = pool_malloc(pool, sizeof(WebdavProperty));
80 memset(prop, 0, sizeof(WebdavProperty));
80 prop->lang = NULL; 81 prop->lang = NULL;
81 prop->name = (char*)name; 82 prop->name = (char*)name;
82 prop->namespace = ns; 83 prop->namespace = ns;
83 prop->value = NULL;
84 return prop; 84 return prop;
85 } 85 }
86 86
87 static UcxKey propkey(const char *ns, const char *name) { 87 static UcxKey propkey(const char *ns, const char *name) {
88 UcxKey key; 88 UcxKey key;
126 126
127 // no duplicate 127 // no duplicate
128 // create property elment and add it to the list 128 // create property elment and add it to the list
129 WebdavProperty *prop = prop_create(sn->pool, pnode->ns, name); 129 WebdavProperty *prop = prop_create(sn->pool, pnode->ns, name);
130 if(proppatch) { 130 if(proppatch) {
131 prop->value = pnode->children; 131 prop->value.node = pnode->children;
132 prop->vtype = WS_VALUE_XML_NODE;
132 } 133 }
133 if(prop) { 134 if(prop) {
134 if(proplist_add(sn->pool, plist_begin, plist_end, prop)) { 135 if(proplist_add(sn->pool, plist_begin, plist_end, prop)) {
135 *error = proppatch ? 136 *error = proppatch ?
136 PROPPATCH_PARSER_OOM : PROPFIND_PARSER_OOM; 137 PROPPATCH_PARSER_OOM : PROPFIND_PARSER_OOM;

mercurial