aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-09-12 00:54:05 +0000
committerlaforge <laforge@osmocom.org>2020-10-07 10:19:58 +0000
commit90391fcfcd463a51e3d214cec1b85d55e6554765 (patch)
tree347323d18bfa893cb0b3ee2c5fadef4d769a2581 /src/osmo-bsc
parent2001dd6cb529a0992e1411b78b39073609350ec6 (diff)
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
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c5
-rw-r--r--src/osmo-bsc/gsm_08_08.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 6bfada38d..95bbb12bf 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -283,11 +283,6 @@ static void gscon_fsm_init(struct osmo_fsm_inst *fi, uint32_t event, void *data)
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 f290a48e4..4c5391860 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -432,6 +432,7 @@ static void parse_powercap(struct gsm_subscriber_connection *conn, struct msgb *
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 @@ int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_chan
* 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 @@ int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_chan
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);