dav/methods.c

changeset 13
8a0cc4d90de7
parent 5
88625853ae74
child 15
182af08b4813
--- a/dav/methods.c	Tue Aug 13 12:44:23 2013 +0200
+++ b/dav/methods.c	Tue Aug 13 13:51:00 2013 +0200
@@ -158,6 +158,7 @@
     xmlDoc *doc = xmlReadMemory(response->space, response->size, url, NULL, 0);
     if(!doc) {
         // TODO: free stuff
+        sn->error = DAV_ERROR;
         return NULL;
     }
     
@@ -185,6 +186,7 @@
                 xmlNode *href_content = node->children;
                 if(href_content->type != XML_TEXT_NODE) {
                     // error
+                    resource->session->error = DAV_ERROR;
                     return 1;
                 }
                 if(xstreq(resource->href, href_content->content)) {
@@ -205,10 +207,12 @@
                         } else if(xstreq(n->name, "status")) {
                             xmlNode *status_node = n->children;
                             if(status_node->type != XML_TEXT_NODE) {
+                                resource->session->error = DAV_ERROR;
                                 return 1;
                             }
                             sstr_t status_str = sstr((char*)status_node->content);
                             if(status_str.length < 13) {
+                                resource->session->error = DAV_ERROR;
                                 return 1;
                             }
                             status_str = sstrsubsl(status_str, 9, 3);

mercurial