This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/9290
Change subject: cosmetic: handover_test: add IMSI to subscr for logging
......................................................................
cosmetic: handover_test: add IMSI to subscr for logging
Change-Id: I52fa8f3183c93ed362d8252d20daf00c60a117c8
---
M tests/handover/handover_test.c
1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/9290/1
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index caa57c1..926ecda 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -242,8 +242,12 @@
void create_conn(struct gsm_lchan *lchan)
{
+ static unsigned int next_imsi = 0;
+ char imsi[sizeof(lchan->conn->bsub->imsi)];
+ struct gsm_network *net = lchan->ts->trx->bts->network;
struct gsm_subscriber_connection *conn;
- conn = bsc_subscr_con_allocate(lchan->ts->trx->bts->network);
+
+ conn = bsc_subscr_con_allocate(net);
/* CAUTION HACK: When __real_mgcp_conn_modify() is called by the GSCON
* FSM, then we need to know the reference to caller FSM (GSCON FSM).
@@ -257,6 +261,12 @@
lchan->conn = conn;
conn->lchan = lchan;
+
+ /* Make up a new IMSI for this test, for logging the subscriber */
+ next_imsi ++;
+ snprintf(imsi, sizeof(imsi), "%06u", next_imsi);
+ lchan->conn->bsub = bsc_subscr_find_or_create_by_imsi(net->bsc_subscribers, imsi);
+
/* kick the FSM from INIT through to the ACTIVE state */
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_REQ, NULL);
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_CFM, NULL);
--
To view, visit https://gerrit.osmocom.org/9290
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52fa8f3183c93ed362d8252d20daf00c60a117c8
Gerrit-Change-Number: 9290
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180524/6391adbb/attachment.htm>