Change in osmo-sip-connector[master]: exit if the sip agent failed to start

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Nov 23 08:07:01 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15532 )

Change subject: exit if the sip agent failed to start
......................................................................

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
---
M src/main.c
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

Objections:
  zecke: I would prefer this is not merged as is



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 @@
 	/* 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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15532
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: I22ed16c77391b4f270df498dda587ed657279390
Gerrit-Change-Number: 15532
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: keith <keith at rhizomatica.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: zecke <holger at freyther.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191123/c1b70793/attachment.htm>


More information about the gerrit-log mailing list