summaryrefslogtreecommitdiff
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-10-05 20:12:28 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-10-05 20:12:28 +0200
commit0e175f9f0fd872e95225355dbdeca49cd35ec0fd (patch)
treee54284ea9541f3de0600acab2c8d76681f4f0ddc /sysdep/unix/main.c
parent6a8d3f1c1ffbd964e4d11b452c73e1ea70310af3 (diff)
Fixes some BFD bugs and makes logging thread-safe.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index bd80ba2c..ecf67b65 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -199,7 +199,7 @@ unix_read_config(struct config **cp, char *name)
return ret;
}
-static void
+static struct config *
read_config(void)
{
struct config *conf;
@@ -211,7 +211,8 @@ read_config(void)
else
die("Unable to open configuration file %s: %m", config_name);
}
- config_commit(conf, RECONFIG_HARD, 0);
+
+ return conf;
}
void
@@ -713,7 +714,7 @@ main(int argc, char **argv)
proto_build(&proto_unix_kernel);
proto_build(&proto_unix_iface);
- read_config();
+ struct config *conf = read_config();
if (parse_and_exit)
exit(0);
@@ -735,6 +736,8 @@ main(int argc, char **argv)
signal_init();
+ config_commit(conf, RECONFIG_HARD, 0);
+
#ifdef LOCAL_DEBUG
async_dump_flag = 1;
#endif