implement named dav repositories webdav

Wed, 10 Aug 2022 20:32:49 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 10 Aug 2022 20:32:49 +0200
branch
webdav
changeset 368
69dbcc7e7f93
parent 367
1592224f6059
child 369
e28ee9875a90

implement named dav repositories

src/server/daemon/config.c file | annotate | diff | comparison | revisions
src/server/daemon/config.h file | annotate | diff | comparison | revisions
--- a/src/server/daemon/config.c	Tue Aug 09 19:01:54 2022 +0200
+++ b/src/server/daemon/config.c	Wed Aug 10 20:32:49 2022 +0200
@@ -150,6 +150,7 @@
     serverconfig->host_vs = ucx_map_new_a(&allocator, 16);
     serverconfig->authdbs = ucx_map_new_a(&allocator, 16);
     serverconfig->resources = ucx_map_new_a(&allocator, 16);
+    serverconfig->dav = ucx_map_new_a(&allocator, 16);
     
     
     
@@ -786,6 +787,15 @@
         }
     }
     
+    if(!ret) {
+        if(name) {
+            ucx_map_cstr_put(cfg->dav, name, repository);
+        } else {
+            log_ereport(LOG_FAILURE, "TODO: location based dav repositories not implemented");
+            ret = 1;
+        }
+    }
+    
     return ret;    
 }
 
--- a/src/server/daemon/config.h	Tue Aug 09 19:01:54 2022 +0200
+++ b/src/server/daemon/config.h	Wed Aug 10 20:32:49 2022 +0200
@@ -72,6 +72,7 @@
     UcxMap          *authdbs;
     MimeMap         *mimetypes;
     UcxMap          *resources;
+    UcxMap          *dav;
     sstr_t          tmp;
     sstr_t          user;
     uint32_t        ref;        // reference counter

mercurial