libidav/methods.c

changeset 743
716f6bf04c30
parent 638
b3077bdb3d77
child 747
efbd59642577
equal deleted inserted replaced
741:e9a5dd08258d 743:716f6bf04c30
654 properties = ucx_list_append(properties, n); 654 properties = ucx_list_append(properties, n);
655 if(xstreq(n->name, "resourcetype")) { 655 if(xstreq(n->name, "resourcetype")) {
656 if(parse_resource_type(n)) { 656 if(parse_resource_type(n)) {
657 iscollection = TRUE; 657 iscollection = TRUE;
658 } 658 }
659 } else if(xstreq(n->ns->href, DAV_NS)) { 659 } else if(n->ns && xstreq(n->ns->href, DAV_NS)) {
660 if(xstreq(n->name, "crypto-name")) { 660 if(xstreq(n->name, "crypto-name")) {
661 crypto_name = util_xml_get_text(n); 661 crypto_name = util_xml_get_text(n);
662 } else if(xstreq(n->name, "crypto-key")) { 662 } else if(xstreq(n->name, "crypto-key")) {
663 crypto_key = util_xml_get_text(n); 663 crypto_key = util_xml_get_text(n);
664 } 664 }
711 int decrypt_props = DAV_ENCRYPT_PROPERTIES(res->session); 711 int decrypt_props = DAV_ENCRYPT_PROPERTIES(res->session);
712 xmlNode *crypto_prop = NULL; 712 xmlNode *crypto_prop = NULL;
713 713
714 UCX_FOREACH(elm, properties) { 714 UCX_FOREACH(elm, properties) {
715 xmlNode *prop = elm->data; 715 xmlNode *prop = elm->data;
716 if(!prop->ns) {
717 continue;
718 }
716 resource_add_property(res, (char*)prop->ns->href, (char*)prop->name, prop->children); 719 resource_add_property(res, (char*)prop->ns->href, (char*)prop->name, prop->children);
717 720
718 if (decrypt_props && 721 if (decrypt_props &&
719 prop->children && 722 prop->children &&
720 prop->children->type == XML_TEXT_NODE && 723 prop->children->type == XML_TEXT_NODE &&

mercurial