aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-09 21:56:42 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-11-12 15:50:36 +0100
commit72f4da98ce606ffb5cf8c6e6a716fa675d5b8c48 (patch)
tree0832440ba9cb021743739d5c02b04e4ca32a114b /openbsc
parentd81eaffbca389f6b1b1f580d8119cda0c303da44 (diff)
osmo-nitb: exit when MNCC socket init failed
Diffstat (limited to 'openbsc')
-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 */