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.
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 7be0360..45156f3 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 @@
 	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 51993dc..5f37073 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 @@
 
 	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;