aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-30 14:30:35 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-30 15:11:29 +0800
commitec4bfdc435e4273a84b586e1c28786de9e440cf6 (patch)
tree28a969c4fac6272d7011565899a197b52cc77484
parent2f4dbebb207d4d35b89320de041ea9cee8a7f81e (diff)
bsc_api: Move the API init into the main function.
The BSC API will not be used until the first iteration through the event loop so it is safe to call it after the bootstrap.
-rw-r--r--openbsc/src/bsc_hack.c2
-rw-r--r--openbsc/src/bsc_init.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 7be03603b..45156f398 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -36,6 +36,7 @@
#include <openbsc/e1_input.h>
#include <osmocore/talloc.h>
#include <openbsc/signal.h>
+#include <openbsc/osmo_msc.h>
#include <osmocom/vty/command.h>
@@ -238,6 +239,7 @@ int main(int argc, char **argv)
rc = bsc_bootstrap_network(mncc_recv, config_file);
if (rc < 0)
exit(1);
+ bsc_api_init(bsc_gsmnet, msc_bsc_api());
/* seed the PRNG */
srand(time(NULL));
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 51993dc41..5f3707381 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -27,7 +27,6 @@
#include <openbsc/abis_nm.h>
#include <openbsc/debug.h>
#include <openbsc/misdn.h>
-#include <openbsc/osmo_msc.h>
#include <osmocom/vty/telnet_interface.h>
#include <openbsc/system_information.h>
#include <openbsc/paging.h>
@@ -1172,7 +1171,6 @@ int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, int, void *),
bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC");
bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC");
- bsc_api_init(bsc_gsmnet, msc_bsc_api());
/* our vty command code expects vty->priv to point to a telnet_connection */
dummy_conn.priv = bsc_gsmnet;