mirror of https://git.48k.eu/ogserver
#988 Add global config variable
This commit makes configuration variable global. To use this variable you have to #import "cfg.h".master
parent
65a14e56d3
commit
f068a79c1a
|
@ -23,4 +23,6 @@ struct og_server_cfg {
|
|||
int parse_json_config(const char *filename, struct og_server_cfg *cfg);
|
||||
void from_json_to_legacy(struct og_server_cfg *cfg);
|
||||
|
||||
extern struct og_server_cfg cfg;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
|
||||
#define OG_SERVER_CFG_JSON "/opt/opengnsys/cfg/ogserver.json"
|
||||
|
||||
struct og_server_cfg cfg;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct ev_io ev_io_server_rest, ev_io_agent_rest;
|
||||
struct og_server_cfg cfg = {};
|
||||
|
||||
og_loop = ev_default_loop(0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue