Change in osmo-bsc[master]: compl l3: populate conn's bsc subscr from MI

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Oct 7 10:20:01 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20344 )

Change subject: compl l3: populate conn's bsc subscr from MI
......................................................................

compl l3: populate conn's bsc subscr from MI

Set conn->bsub as indicated by the Mobile Identity. Now the
'log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);' becomes useful.

Upcoming patch to support Perform Location Request will use the subscriber to
retrieve an already established conn via the bsub.

Drop fixme in gscon_fsm_init(), MI now extracted and id updated.

Change-Id: I00d4c7e8284b745368a432a7ec176aa99f79db47
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/gsm_08_08.c
2 files changed, 7 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 6bfada3..95bbb12 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -283,11 +283,6 @@
 	case GSCON_EV_A_CONN_REQ:
 		/* RLL ESTABLISH IND with initial L3 Message */
 		msg = data;
-		/* FIXME: Extract Mobile ID and update FSM using osmo_fsm_inst_set_id()
-		 * i.e. we will probably extract the mobile identity earlier, where the
-		 * imsi filter code is. Then we could just use it here.
-		 * related: OS#2969 */
-
 		rc = osmo_bsc_sigtran_open_conn(conn, msg);
 		if (rc < 0) {
 			osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index f290a48..4c53918 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -432,6 +432,7 @@
 int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_channel)
 {
 	struct gsm_subscriber_connection *conn;
+	struct bsc_subscr *bsub = NULL;
 	struct bsc_msc_data *msc;
 	struct msgb *create_l3;
 	struct gsm0808_speech_codec_list scl;
@@ -462,6 +463,8 @@
 		 * all, should happen in a separate patch.
 		 * See e.g.  BSC_Tests.TC_chan_rel_rll_rel_ind: "dt := * f_est_dchan('23'O, 23, '00010203040506'O);"
 		 */
+	} else {
+		bsub = bsc_subscr_find_or_create_by_mi(bsc_gsmnet->bsc_subscribers, &mi);
 	}
 
 	/* allocate a new connection */
@@ -470,6 +473,10 @@
 		LOG_COMPL_L3(pdisc, mtype, LOGL_ERROR, "Failed to allocate conn\n");
 		goto early_fail;
 	}
+	if (bsub) {
+		/* pass bsub use count to conn */
+		conn->bsub = bsub;
+	}
 	gscon_change_primary_lchan(conn, lchan);
 	gscon_update_id(conn);
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20344
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I00d4c7e8284b745368a432a7ec176aa99f79db47
Gerrit-Change-Number: 20344
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201007/eed8c3ae/attachment.htm>


More information about the gerrit-log mailing list