summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-nitb/bsc_hack.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-09 21:56:42 +0200
committerHarald Welte <laforge@gnumonks.org>2016-12-02 12:09:17 +0000
commit50669bebdbc53826b63f8cf0542bb2787d3dd0cb (patch)
tree48ae6e849a401df133745e8a14cd484bb803606d /openbsc/src/osmo-nitb/bsc_hack.c
parent42eb0141d7f41ca4576c92bf694406f9fefa26df (diff)
osmo-nitb: exit when MNCC socket init failed
Diffstat (limited to 'openbsc/src/osmo-nitb/bsc_hack.c')
-rw-r--r--openbsc/src/osmo-nitb/bsc_hack.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index c3ecf4ca7..992d4c855 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -292,9 +292,13 @@ int main(int argc, char **argv)
#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 */