From cacb7c46e3ce6032b5e6664cccee1d6877b34ace Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Fri, 25 Nov 2011 17:50:47 +0400 Subject: [PATCH] make config structure pointer global --- yasnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yasnd.c b/yasnd.c index 9e38e25..f575f5c 100644 --- a/yasnd.c +++ b/yasnd.c @@ -22,6 +22,7 @@ typedef struct { int fail_count; // how many times in a row host was unreachable } host_decl; +cfg_t *cfg; // pointer to configuration structure host_decl* hosts=NULL; // structure with hosts' definitions int hosts_count=0; // count of hosts int debug_flag=0; @@ -55,7 +56,6 @@ void init() CFG_SIMPLE_INT("debug", &debug_flag), CFG_END() }; - cfg_t *cfg; cfg = cfg_init(opts, CFGF_NONE); // check if config file is valid and parse it if (cfg_parse(cfg, "/etc/yasnd.conf") == CFG_PARSE_ERROR)