summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-01-03 20:31:46 +0100
committerAlfred E. Heggestad <aeh@db.org>2016-01-03 20:31:46 +0100
commit435e7c62382df0adcfcec0bae6fd8e65c7dacbda (patch)
tree002c518e7c33f2f2f1cf6d986e5bc169f3901a13 /src/main.c
parent837aa4dd496ccec4dc6174aad3e5021dfdc6fffe (diff)
conf: keep the struct conf allocated
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index a7aee59..1760dc7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -141,6 +141,12 @@ int main(int argc, char *argv[])
(void)argv;
#endif
+ err = conf_configure();
+ if (err) {
+ warning("main: configure failed: %m\n", err);
+ goto out;
+ }
+
/* NOTE: must be done after all arguments are processed */
if (modc) {
size_t i;
@@ -158,12 +164,6 @@ int main(int argc, char *argv[])
}
}
- err = conf_configure();
- if (err) {
- warning("main: configure failed: %m\n", err);
- goto out;
- }
-
/* Initialise User Agents */
err = ua_init("baresip v" BARESIP_VERSION " (" ARCH "/" OS ")",
true, true, true, prefer_ipv6);
@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
ua_stop_all(true);
ua_close();
- mod_close();
+ conf_close();
libre_close();