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" |
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(); |