[MERGED] openbsc[master]: osmo-nitb: exit when MNCC socket init failed

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Dec 2 12:09:19 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: osmo-nitb: exit when MNCC socket init failed
......................................................................


osmo-nitb: exit when MNCC socket init failed

Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915
---
M openbsc/src/osmo-nitb/bsc_hack.c
1 file changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index c3ecf4c..992d4c8 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -292,9 +292,13 @@
 #endif
 
 	/* Initialize MNCC socket if appropriate */
-	if (mncc_sock_path)
-		mncc_sock_init(bsc_gsmnet, mncc_sock_path);
-	else
+	if (mncc_sock_path) {
+		rc = mncc_sock_init(bsc_gsmnet, mncc_sock_path);
+		if (rc) {
+			fprintf(stderr, "MNCC socket initialization failed. exiting.\n");
+			exit(1);
+		}
+	} else
 		DEBUGP(DMNCC, "Using internal MNCC handler.\n");
 
 	/* Read the config */

-- 
To view, visit https://gerrit.osmocom.org/1141
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915
Gerrit-PatchSet: 9
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list