dav/scfg.c

changeset 316
9d0505d80044
parent 288
cd3846cc8b25
child 319
2433b5969d44
--- a/dav/scfg.c	Sat Sep 23 11:45:03 2017 +0200
+++ b/dav/scfg.c	Sun Sep 24 11:31:01 2017 +0200
@@ -137,6 +137,7 @@
     bool backuppull = false;
     bool lockpull = false;
     bool lockpush = false;
+    time_t lock_timeout = 0;
     
     unsigned short parentlineno = node->line;
     node = node->children;
@@ -183,6 +184,14 @@
                 lockpull = util_getboolean(value);
             } else if(xstreq(node->name, "lock-push")) {
                 lockpush = util_getboolean(value);
+            } else if(xstreq(node->name, "lock-timeout")) {
+                int64_t t = 0;
+                if(util_strtoint(value, &t)) {
+                    lock_timeout = (time_t)t;
+                } else {
+                    print_warning(node->line, "integer value "
+                            "expected in <lock-timeout> element\n");
+                }
             } else {
                 print_error(node->line,
                         "unknown directory config element: %s\n", node->name);
@@ -222,6 +231,7 @@
     dir->backuppull = backuppull;
     dir->lockpull = lockpull;
     dir->lockpush = lockpush;
+    dir->lock_timeout = lock_timeout;
     if (include) {
         dir->include = include;
     } else {

mercurial