src/server/daemon/configmanager.c

changeset 39
de4bc3cd2d36
parent 37
360b9aabe17e
child 44
3da1f7b6847f
--- a/src/server/daemon/configmanager.c	Sat Dec 29 18:08:23 2012 +0100
+++ b/src/server/daemon/configmanager.c	Sun Dec 30 15:49:44 2012 +0100
@@ -118,8 +118,8 @@
     }
 
     struct stat s;
-    if(stat("conf/server.conf", &s) != 0) {
-        perror("stat(\"conf/server.conf\")");
+    if(stat("config/server.conf", &s) != 0) {
+        perror("stat(\"config/server.conf\")");
         return -1;
     }
 
@@ -128,7 +128,7 @@
         printf("cfgmgr load server.conf\n");
         config = load_server_conf(
             current_config,
-            "conf/server.conf");
+            "config/server.conf");
 
         if(config == NULL) {
             fprintf(stderr, "Cannot load server.conf\n");
@@ -144,7 +144,7 @@
         /*
         config = load_server_conf(
             current_config,
-            "conf/server.conf");
+            "config/server.conf");
         */
         config = malloc(sizeof(ServerConfiguration));
         config->ref = 1;
@@ -152,7 +152,7 @@
         config->user = sstrdup_pool(config->pool, current_config->user);
         config->tmp = sstrdup_pool(config->pool, current_config->tmp);
         
-        // copy configuration       
+        // copy configuration
         config->host_vs = ucx_map_clone(
                 current_config->host_vs,
                 copy_vs,
@@ -163,7 +163,9 @@
                 (copy_func)copy_listener,
                 config);
         
-
+        // TODO: we need to get the mime map from the configfile data
+        config->mimetypes = current_config->mimetypes;
+        
         if(config == NULL) {
             fprintf(stderr, "Cannot load server.conf\n");
             return -1;

mercurial