From 04ad7d8454a1076b7002ec9d594f6f9f7064fa54 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Mon, 28 Jul 2014 05:06:19 +0000 Subject: [PATCH] Moved initializion of controlport to the pre-init section. FossilOrigin-Name: fb78a475a2aa9580a844bae02a85d93202d7af06e356859cb3a4fe0e161efc7e --- src/ac/conf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ac/conf.c b/src/ac/conf.c index f3efa2d2..324520e1 100644 --- a/src/ac/conf.c +++ b/src/ac/conf.c @@ -182,9 +182,6 @@ static int init_version() static int init_control_port() { - if (conf_control_port != 0) - return 1; - char str[30]; sprintf(str,"%d",CONF_DEFAULT_CONTROL_PORT); conf_control_port=(char*)cw_setstr((uint8_t**)&conf_control_port,(uint8_t*)str,strlen(str)); @@ -441,6 +438,8 @@ static int conf_read_strings( cfg_t * cfg, char * name, char ***dst,int *len) int read_config(const char * filename){ int i,n; + if (!init_control_port()) + return 0; cfg_opt_t opts[] = { CFG_STR_LIST("listen", "{}", CFGF_NONE), @@ -521,8 +520,6 @@ int read_config(const char * filename){ return 0; - if (!init_control_port()) - return 0; init_listen_addrs(); init_mcast_groups();