dav/scfg.c

changeset 56
99f7816fcf01
parent 47
fbbbeed4ba8f
child 58
1708cba82ca3
--- a/dav/scfg.c	Mon Aug 04 12:53:36 2014 +0200
+++ b/dav/scfg.c	Mon Aug 04 14:33:56 2014 +0200
@@ -79,6 +79,7 @@
 int scfg_load_directory(xmlNode *node) {
     char *name = NULL;
     char *path = NULL;
+    char *collection = NULL;
     char *repository = NULL;
     char *database = NULL;
     
@@ -92,6 +93,8 @@
                 name = value;
             } else if(xstreq(node->name, "path")) {
                 path = value;
+            } else if(xstreq(node->name, "collection")) {
+                collection = value;
             } else if(xstreq(node->name, "repository")) {
                 repository = value;
             } else if(xstreq(node->name, "database")) {
@@ -121,6 +124,7 @@
     SyncDirectory *dir = malloc(sizeof(SyncDirectory));
     dir->name = strdup(name);
     dir->path = strdup(path);
+    dir->collection = collection ? strdup(collection) : NULL;
     dir->repository = strdup(repository);
     dir->database = strdup(database);
     

mercurial