aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bssap/bssap_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bssap/bssap_test.c')
-rw-r--r--tests/bssap/bssap_test.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c
index 861c98fa8..ad8974f73 100644
--- a/tests/bssap/bssap_test.c
+++ b/tests/bssap/bssap_test.c
@@ -80,22 +80,23 @@ struct {
},
};
+struct gsm_network *bsc_gsmnet;
+
void test_cell_identifier()
{
int i;
int rc;
- struct gsm_network *net;
struct bsc_msc_data *msc;
struct gsm_bts *bts;
- net = bsc_network_init(NULL, 1, 1);
- net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf);
- net->bsc_data->rf_ctrl->policy = S_RF_ON;
+ bsc_gsmnet = bsc_network_init(NULL, 1, 1);
+ bsc_gsmnet->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf);
+ bsc_gsmnet->bsc_data->rf_ctrl->policy = S_RF_ON;
- msc = talloc_zero(net, struct bsc_msc_data);
- msc->network = net;
+ msc = talloc_zero(bsc_gsmnet, struct bsc_msc_data);
+ msc->network = bsc_gsmnet;
- bts = gsm_bts_alloc_register(net, GSM_BTS_TYPE_UNKNOWN, 0);
+ bts = gsm_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0);
if (bts == NULL) {
fprintf(stderr, "gsm_bts_alloc_register() returned NULL\n");
return;