summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-09-16 01:10:30 +0200
committerlaforge <laforge@osmocom.org>2019-11-23 08:07:01 +0000
commit632156a4a8146f5644ddbebf042e31bd0562b32f (patch)
treeae6a1f475f5f6e4299d6cec4e06564be1dac8318
parent5e3c9d7224758e0fd530f7718e1bb97bc5c9ae62 (diff)
exit if the sip agent failed to start
When the sip agent start fails (i.e. port can not bind because IP doesn't exist) exit the sip-connector Relates: OS#4197 Change-Id: I22ed16c77391b4f270df498dda587ed657279390
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 13fdd5d..3385e37 100644
--- a/src/main.c
+++ b/src/main.c
@@ -158,9 +158,11 @@ int main(int argc, char **argv)
/* sofia sip */
sip_agent_init(&g_app.sip.agent, &g_app);
rc = sip_agent_start(&g_app.sip.agent);
- if (rc < 0)
+ if (rc < 0) {
LOGP(DSIP, LOGL_ERROR,
- "Failed to initialize SIP. Running broken\n");
+ "Failed to initialize SIP\n");
+ exit(1);
+ }
calls_init();
app_setup(&g_app);