diff options
-rw-r--r-- | openbsc/src/osmo-nitb/bsc_hack.c | 6 | ||||
-rw-r--r-- | openbsc/tests/vty_test_runner.py | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index d746bf14e..67c65ce61 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -38,6 +38,7 @@ #include <osmocom/core/talloc.h> #include <openbsc/signal.h> #include <openbsc/osmo_msc.h> +#include <openbsc/osmo_msc_data.h> #include <openbsc/sms_queue.h> #include <openbsc/vty.h> #include <openbsc/bss.h> @@ -52,7 +53,6 @@ /* MCC and MNC for the Location Area Identifier */ struct gsm_network *bsc_gsmnet = 0; -static struct osmo_bsc_rf *rf_ctrl; static const char *database_name = "hlr.sqlite3"; static const char *config_file = "openbsc.cfg"; static const char *rf_ctrl_name = NULL; @@ -298,8 +298,8 @@ int main(int argc, char **argv) /* seed the PRNG */ srand(time(NULL)); - rf_ctrl = osmo_bsc_rf_create(rf_ctrl_name, bsc_gsmnet); - if (!rf_ctrl) { + bsc_gsmnet->bsc_data->rf_ctrl = osmo_bsc_rf_create(rf_ctrl_name, bsc_gsmnet); + if (!bsc_gsmnet->bsc_data->rf_ctrl) { fprintf(stderr, "Failed to create the RF service.\n"); exit(1); } diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 7c8fe8c30..6bbc606cf 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -248,6 +248,10 @@ class TestVTYNITB(TestVTYGenericBSC): res = self.vty.command("show paging-group 0 1234567") self.assertEquals(res, "%Paging group for IMSI 1234567 on BTS #0 is 7") + def testShowNetwork(self): + res = self.vty.command("show network") + self.assert_(res.startswith('BSC is on Country Code') >= 0) + class TestVTYBSC(TestVTYGenericBSC): def vty_command(self): @@ -382,6 +386,10 @@ class TestVTYBSC(TestVTYGenericBSC): res = self.vty.command("write terminal") self.assertEquals(res.find(' timezone'), -1) + def testShowNetwork(self): + res = self.vty.command("show network") + self.assert_(res.startswith('BSC is on Country Code') >= 0) + class TestVTYNAT(TestVTYGenericBSC): def vty_command(self): |