summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-nitb
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-13 15:05:26 +0100
committerHarald Welte <laforge@gnumonks.org>2013-03-13 15:30:48 +0100
commit76afa16d049a6c83555c6e99f0cec20b00d9536c (patch)
tree0dcca304f23aa36ccf0c88413c5ea71749325fec /openbsc/src/osmo-nitb
parent8b29180cad875b396288a22fb252e158fa2a060a (diff)
SMPP: Fix crash on delivery of incoming SUBMIT-SM
As bsc_gsmnet is NULL at the time we call smpp_openbsc_init(), we later run into segfaults with subscribers that don't have a subscr->net set. However, we cannot delay smpp_openbsc_init() until after bsc_bootstrap_network(), as we then fail to parse the SMPP specific VTY/config file options...
Diffstat (limited to 'openbsc/src/osmo-nitb')
-rw-r--r--openbsc/src/osmo-nitb/bsc_hack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 93630ae6a..13fa1c587 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -263,7 +263,7 @@ int main(int argc, char **argv)
bsc_vty_init(&log_info);
#ifdef BUILD_SMPP
- if (smpp_openbsc_init(bsc_gsmnet, 0) < 0)
+ if (smpp_openbsc_init(tall_bsc_ctx, 0) < 0)
return -1;
#endif
@@ -279,6 +279,7 @@ int main(int argc, char **argv)
rc = bsc_bootstrap_network(int_mncc_recv, config_file);
if (rc < 0)
exit(1);
+ smpp_openbsc_set_net(bsc_gsmnet);
bsc_api_init(bsc_gsmnet, msc_bsc_api());
bsc_gsmnet->ctrl = controlif_setup(bsc_gsmnet, 4249);