From be766607183547244b03b92c2e9384ce3e40041b Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 3 Mar 2017 18:48:13 +0100 Subject: wip Change-Id: Ie8814d856bbe4c111007a696a4d26576854c134f --- openbsc/src/osmo-msc/msc_main.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/openbsc/src/osmo-msc/msc_main.c b/openbsc/src/osmo-msc/msc_main.c index f222cc7a9..e70a0168b 100644 --- a/openbsc/src/osmo-msc/msc_main.c +++ b/openbsc/src/osmo-msc/msc_main.c @@ -260,10 +260,6 @@ void msc_network_shutdown(struct gsm_network *net) static struct gsm_network *msc_network = NULL; -/* TODO this is here to satisfy linking during intermediate development. Once - * libbsc is not linked to osmo-msc, this should go away. */ -struct gsm_network *bsc_gsmnet = NULL; - extern void *tall_vty_ctx; static void signal_handler(int signal) { @@ -305,12 +301,6 @@ static void db_sync_timer_cb(void *data) osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL); } -static void subscr_expire_cb(void *data) -{ - /* TODO expire vlr_subscrs? */ - osmo_timer_schedule(&bsc_gsmnet->subscr_expire_timer, EXPIRE_INTERVAL); -} - extern int bsc_vty_go_parent(struct vty *vty); static struct vty_app_info msc_vty_info = { @@ -370,6 +360,11 @@ int main(int argc, char **argv) if (!msc_network) return -ENOMEM; + if (msc_vlr_alloc(msc_network)) { + fprintf(stderr, "Failed to allocate VLR\n"); + exit(1); + } + ctrl_vty_init(tall_msc_ctx); logging_vty_add_cmds(&log_info); msc_vty_init(msc_network); @@ -426,7 +421,7 @@ int main(int argc, char **argv) * A third-party MSC may well be able to handle a TCH/H TCH/F * mismatch. */ - bsc_gsmnet->dyn_ts_allow_tch_f = false; + msc_network->dyn_ts_allow_tch_f = false; /* start control interface after reading config for * ctrl_vty_get_bind_addr() */ @@ -448,7 +443,7 @@ TODO: we probably want some of the _net_ ctrl commands from bsc_base_ctrl_cmds_i #endif #if 0 - if (msc_ctrl_cmds_install(bsc_gsmnet) != 0) { + if (msc_ctrl_cmds_install(msc_network) != 0) { printf("Failed to initialize the MSC control commands.\n"); return -1; } @@ -466,7 +461,7 @@ TODO: we probably want some of the _net_ ctrl commands from bsc_base_ctrl_cmds_i } osmo_fsm_log_addr(true); - if (msc_vlr_start(bsc_gsmnet)) { + if (msc_vlr_start(msc_network)) { fprintf(stderr, "Failed to start VLR\n"); exit(1); } -- cgit v1.2.3