fixed get command and davql exec

Sat, 03 Oct 2015 00:09:23 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 03 Oct 2015 00:09:23 +0200
changeset 143
d8b01bed3d83
parent 142
0c0ccb7f71ba
child 144
c2c02c9b3be4

fixed get command and davql exec

dav/main.c file | annotate | diff | comparison | revisions
libidav/davqlexec.c file | annotate | diff | comparison | revisions
libidav/resource.c file | annotate | diff | comparison | revisions
--- a/dav/main.c	Fri Oct 02 15:13:30 2015 +0200
+++ b/dav/main.c	Sat Oct 03 00:09:23 2015 +0200
@@ -419,7 +419,7 @@
     free(path);
     //free(base);
     
-    dav_session_destroy(sn);
+    //dav_session_destroy(sn);
     
     return ret;
 }
@@ -616,10 +616,10 @@
     int depth = recursive ? -1 : 1;
     res = dav_query(
             sn,
-            "select - from %s with = depth %d where lastmodified > %t",
+            "select - from %s with depth = %d where lastmodified > %t",
             path,
-            t,
-            depth);
+            depth,
+            t);
     
     if(!res) {
         print_resource_error(sn, path);
--- a/libidav/davqlexec.c	Fri Oct 02 15:13:30 2015 +0200
+++ b/libidav/davqlexec.c	Sat Oct 03 00:09:23 2015 +0200
@@ -488,9 +488,9 @@
                                 }
                                 result.status = -1;
                             }
-                        } else {
-                            result.status = -1;
                         }
+                        result.result = NULL;
+                        result.status = -1;
                         dav_resource_free_all(selroot);
                         ucx_list_free(stack);
                         break;
--- a/libidav/resource.c	Fri Oct 02 15:13:30 2015 +0200
+++ b/libidav/resource.c	Sat Oct 03 00:09:23 2015 +0200
@@ -639,7 +639,7 @@
     CURL *handle = sn->handle;
     util_set_url(res->session, dav_resource_get_href(res));
     
-    // check encryption
+    // check encryptions
     AESDecrypter *dec = NULL;
     if(DAV_DECRYPT_CONTENT(sn)) {
         char *keyname = dav_get_property_ns(res, DAV_NS, "crypto-key");

mercurial