aboutsummaryrefslogtreecommitdiffstats
path: root/tests/handover/handover_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/handover/handover_test.c')
-rw-r--r--tests/handover/handover_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index f7b408be6..fedaf7d9b 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -186,7 +186,15 @@ static struct gsm_bts *create_bts(int arfcn)
void create_conn(struct gsm_lchan *lchan)
{
+ static unsigned int next_imsi = 0;
+ struct gsm_network *net = lchan->ts->trx->bts->network;
+ char imsi[sizeof(lchan->conn->bsub->imsi)];
+
+ next_imsi ++;
+ snprintf(imsi, sizeof(imsi), "%06u", next_imsi);
+
lchan->conn = bsc_subscr_con_allocate(lchan);
+ lchan->conn->bsub = bsc_subscr_find_or_create_by_imsi(net->bsc_subscribers, imsi);
}
/* create lchan */