35:4417619a9bbd | 36:450d2d5f4735 |
---|---|
27 */ | 27 */ |
28 | 28 |
29 #ifndef CONF_H | 29 #ifndef CONF_H |
30 #define CONF_H | 30 #define CONF_H |
31 | 31 |
32 #include <inttypes.h> | |
33 | |
32 #include "../util/object.h" | 34 #include "../util/object.h" |
33 | 35 |
34 #include "../config/objconf.h" | 36 #include "../config/objconf.h" |
35 #include "../config/initconf.h" | 37 #include "../config/initconf.h" |
36 #include "../config/serverconf.h" | 38 #include "../config/serverconf.h" |
52 UcxList *listeners; // list of all listeners | 54 UcxList *listeners; // list of all listeners |
53 UcxList *logfiles; | 55 UcxList *logfiles; |
54 UcxMap *authdbs; | 56 UcxMap *authdbs; |
55 sstr_t tmp; | 57 sstr_t tmp; |
56 sstr_t user; | 58 sstr_t user; |
59 uint32_t ref; // reference counter | |
57 } ServerConfiguration; | 60 } ServerConfiguration; |
58 | 61 |
59 | 62 |
60 typedef struct ConfigFile ConfigFile; | 63 typedef struct ConfigFile ConfigFile; |
61 | 64 |
84 int cfg_handle_listener(ServerConfiguration *cfg, ServerConfigObject *obj); | 87 int cfg_handle_listener(ServerConfiguration *cfg, ServerConfigObject *obj); |
85 | 88 |
86 int cfg_handle_vs(ServerConfiguration *cfg, ServerConfigObject *obj); | 89 int cfg_handle_vs(ServerConfiguration *cfg, ServerConfigObject *obj); |
87 | 90 |
88 ServerConfiguration* load_server_conf(ServerConfiguration *old, char *file); | 91 ServerConfiguration* load_server_conf(ServerConfiguration *old, char *file); |
92 void cfg_ref(ServerConfiguration *cfg); | |
93 void cfg_unref(ServerConfiguration *cfg); | |
89 | 94 |
90 int object_conf_reload(ConfigFile *file, ServerConfiguration *cfg); | 95 int object_conf_reload(ConfigFile *file, ServerConfiguration *cfg); |
91 | 96 |
92 HTTPObjectConfig* load_obj_conf(char *file); | 97 HTTPObjectConfig* load_obj_conf(char *file); |
93 | 98 |