<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20344">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">compl l3: populate conn's bsc subscr from MI<br><br>Set conn->bsub as indicated by the Mobile Identity. Now the<br>'log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);' becomes useful.<br><br>Upcoming patch to support Perform Location Request will use the subscriber to<br>retrieve an already established conn via the bsub.<br><br>Drop fixme in gscon_fsm_init(), MI now extracted and id updated.<br><br>Change-Id: I00d4c7e8284b745368a432a7ec176aa99f79db47<br>---<br>M src/osmo-bsc/bsc_subscr_conn_fsm.c<br>M src/osmo-bsc/gsm_08_08.c<br>2 files changed, 7 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/20344/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>index 142e1ab..cf38f44 100644</span><br><span>--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>@@ -283,11 +283,6 @@</span><br><span>     case GSCON_EV_A_CONN_REQ:</span><br><span>            /* RLL ESTABLISH IND with initial L3 Message */</span><br><span>              msg = data;</span><br><span style="color: hsl(0, 100%, 40%);">-             /* FIXME: Extract Mobile ID and update FSM using osmo_fsm_inst_set_id()</span><br><span style="color: hsl(0, 100%, 40%);">-          * i.e. we will probably extract the mobile identity earlier, where the</span><br><span style="color: hsl(0, 100%, 40%);">-          * imsi filter code is. Then we could just use it here.</span><br><span style="color: hsl(0, 100%, 40%);">-          * related: OS#2969 */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>               rc = osmo_bsc_sigtran_open_conn(conn, msg);</span><br><span>          if (rc < 0) {</span><br><span>                     osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);</span><br><span>diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c</span><br><span>index 5a25aad..8650da2 100644</span><br><span>--- a/src/osmo-bsc/gsm_08_08.c</span><br><span>+++ b/src/osmo-bsc/gsm_08_08.c</span><br><span>@@ -432,6 +432,7 @@</span><br><span> int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_channel)</span><br><span> {</span><br><span>   struct gsm_subscriber_connection *conn;</span><br><span style="color: hsl(120, 100%, 40%);">+       struct bsc_subscr *bsub = NULL;</span><br><span>      struct bsc_msc_data *msc;</span><br><span>    struct msgb *create_l3;</span><br><span>      struct gsm0808_speech_codec_list scl;</span><br><span>@@ -462,6 +463,8 @@</span><br><span>           * all, should happen in a separate patch.</span><br><span>            * See e.g.  BSC_Tests.TC_chan_rel_rll_rel_ind: "dt := * f_est_dchan('23'O, 23, '00010203040506'O);"</span><br><span>                */</span><br><span style="color: hsl(120, 100%, 40%);">+   } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              bsub = bsc_subscr_find_or_create_by_mi(bsc_gsmnet->bsc_subscribers, &mi);</span><br><span>     }</span><br><span> </span><br><span>        /* allocate a new connection */</span><br><span>@@ -470,6 +473,10 @@</span><br><span>               LOG_COMPL_L3(pdisc, mtype, LOGL_ERROR, "Failed to allocate conn\n");</span><br><span>               goto early_fail;</span><br><span>     }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (bsub) {</span><br><span style="color: hsl(120, 100%, 40%);">+           /* pass bsub use count to conn */</span><br><span style="color: hsl(120, 100%, 40%);">+             conn->bsub = bsub;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span>    gscon_change_primary_lchan(conn, lchan);</span><br><span>     gscon_update_id(conn);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20344">change 20344</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/20344"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I00d4c7e8284b745368a432a7ec176aa99f79db47 </div>
<div style="display:none"> Gerrit-Change-Number: 20344 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>