aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-nitb
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-05 12:22:35 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2011-08-22 19:27:49 +0200
commit40f917f3a6dc7d801192b9c8d8cb849fe54923ef (patch)
tree4d40927acd34f6f4e28465add793a6bb77b88c07 /openbsc/src/osmo-nitb
parent5c5bfc4e3cdf98101ac6cf1094649bebee01fcac (diff)
libctrl: Improve error handling if controlif setup fails
Diffstat (limited to 'openbsc/src/osmo-nitb')
-rw-r--r--openbsc/src/osmo-nitb/bsc_hack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 724e97344..7135455ab 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -251,6 +251,11 @@ int main(int argc, char **argv)
bsc_api_init(bsc_gsmnet, msc_bsc_api());
bsc_gsmnet->ctrl = controlif_setup(bsc_gsmnet, 4249);
+ if (!bsc_gsmnet->ctrl) {
+ printf("Failed to initialize control interface. Exiting.\n");
+ return -1;
+ }
+
/* seed the PRNG */
srand(time(NULL));