diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-09-12 00:54:05 +0000 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-07 10:19:58 +0000 |
commit | 90391fcfcd463a51e3d214cec1b85d55e6554765 (patch) | |
tree | 347323d18bfa893cb0b3ee2c5fadef4d769a2581 /src/osmo-bsc/gsm_08_08.c | |
parent | 2001dd6cb529a0992e1411b78b39073609350ec6 (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/gsm_08_08.c')
-rw-r--r-- | src/osmo-bsc/gsm_08_08.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |