src/server/daemon/webserver.c

changeset 385
a1f4cb076d2f
parent 269
3dfbd0b91950
child 386
b91f8efadb63
equal deleted inserted replaced
210:21274e5950af 385:a1f4cb076d2f
46 #include "../public/auth.h" 46 #include "../public/auth.h"
47 #include "../util/systhr.h" 47 #include "../util/systhr.h"
48 #include "../util/io.h" 48 #include "../util/io.h"
49 #include "../util/util.h" 49 #include "../util/util.h"
50 50
51 #include "../../ucx/utils.h" 51 #include <ucx/utils.h>
52 52
53 #include "../safs/common.h" 53 #include "../safs/common.h"
54 54
55 #include "func.h" 55 #include "func.h"
56 #include "config.h" 56 #include "config.h"
58 #include "httplistener.h" 58 #include "httplistener.h"
59 #include "webserver.h" 59 #include "webserver.h"
60 #include "log.h" 60 #include "log.h"
61 #include "auth.h" 61 #include "auth.h"
62 #include "srvctrl.h" 62 #include "srvctrl.h"
63 #include "resourcepool.h"
63 64
64 extern struct FuncStruct webserver_funcs[]; 65 extern struct FuncStruct webserver_funcs[];
65 66
66 static RestartCallback *atrestart; 67 static RestartCallback *atrestart;
67 68
75 } 76 }
76 77
77 // init NSAPI functions 78 // init NSAPI functions
78 func_init(); 79 func_init();
79 add_functions(webserver_funcs); 80 add_functions(webserver_funcs);
81
82 // init resource pools
83 if(init_resource_pools()) {
84 return -1;
85 }
80 86
81 // load init.conf 87 // load init.conf
82 if(load_init_conf("config/init.conf")) { 88 if(load_init_conf("config/init.conf")) {
83 return -1; 89 return -1;
84 } 90 }
85 91
86 // load server.conf 92 // load server.conf
87 init_configuration_manager(); 93 init_configuration_manager();
88 ServerConfiguration *cfg; 94 ServerConfiguration *cfg;
89 if(cfgmgr_load_config(&cfg) != 0) { 95 if(cfgmgr_load_config(&cfg) != 0) {
90 fprintf(stderr, "Cannot load configuration\n");
91 return -1; 96 return -1;
92 } 97 }
93 98
94 // init caches 99 // init caches
95 auth_cache_init(); 100 auth_cache_init();

mercurial