summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-nitb/bsc_hack.c
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-05 12:22:35 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-11 15:20:55 +0200
commit5e95f45af0e96c9f79d053de55a1cbd689496883 (patch)
tree16d1ea7f246c1e4cc3a48dde22e5f15ce38c0101 /openbsc/src/osmo-nitb/bsc_hack.c
parent5ff06af6f560b9e906d6c320325ae84f3602f397 (diff)
ctrl: Improve error handling if controlif setup fails
Diffstat (limited to 'openbsc/src/osmo-nitb/bsc_hack.c')
-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 b528a660b..7427ead96 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -269,6 +269,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));