<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-msc/+/24817">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sgs: Use available APi to set vlr subscr LastUsedEutranPLMNId<br><br>This way it's easier to find out where the vlr subscriber field is set.<br><br>Change-Id: I203de82accc896c196cb70037af89be6dc826c05<br>---<br>M src/libmsc/sgs_iface.c<br>1 file changed, 8 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/17/24817/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c</span><br><span>index 04302ae..9d7b6fc 100644</span><br><span>--- a/src/libmsc/sgs_iface.c</span><br><span>+++ b/src/libmsc/sgs_iface.c</span><br><span>@@ -915,6 +915,8 @@</span><br><span> static int sgs_rx_csfb_ind(struct sgs_connection *sgc, struct msgb *msg, const struct tlv_parsed *tp, char *imsi)</span><br><span> {</span><br><span> struct vlr_subscr *vsub;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct osmo_plmn_id last_eutran_plmn_buf;</span><br><span style="color: hsl(120, 100%, 40%);">+ const struct osmo_plmn_id *last_eutran_plmn = &last_eutran_plmn_buf;</span><br><span> </span><br><span> /* The MME informs us with this message that the UE has initiated a</span><br><span> * service request for MO CS fallback. There is not much we can do with</span><br><span>@@ -928,23 +930,23 @@</span><br><span> /* 3GPP TS 23.272 sec 4.3.3 (CSFB):</span><br><span> * "During the SGs location update procedure, obtaining the last used LTE PLMN ID via TAI"</span><br><span> */</span><br><span style="color: hsl(0, 100%, 40%);">- vsub->sgs.last_eutran_plmn_present = TLVP_PRES_LEN(tp, SGSAP_IE_EUTRAN_CGI, 3);</span><br><span> if (TLVP_PRES_LEN(tp, SGSAP_IE_TAI, 3)) {</span><br><span style="color: hsl(0, 100%, 40%);">- vsub->sgs.last_eutran_plmn_present = true;</span><br><span style="color: hsl(0, 100%, 40%);">- osmo_plmn_from_bcd(TLVP_VAL(tp, SGSAP_IE_TAI), &vsub->sgs.last_eutran_plmn);</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_plmn_from_bcd(TLVP_VAL(tp, SGSAP_IE_TAI), &last_eutran_plmn_buf);</span><br><span> /* TODO: we could also gather the TAC from here, but we don't need it yet */</span><br><span> } else if (TLVP_PRES_LEN(tp, SGSAP_IE_EUTRAN_CGI, 3)) {</span><br><span> /* Since TAI is optional, let's try harder getting Last Used</span><br><span> * E-UTRAN PLMN ID by fetching it from E-UTRAN CGI */</span><br><span style="color: hsl(0, 100%, 40%);">- vsub->sgs.last_eutran_plmn_present = true;</span><br><span style="color: hsl(0, 100%, 40%);">- osmo_plmn_from_bcd(TLVP_VAL(tp, SGSAP_IE_EUTRAN_CGI), &vsub->sgs.last_eutran_plmn);</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_plmn_from_bcd(TLVP_VAL(tp, SGSAP_IE_EUTRAN_CGI), &last_eutran_plmn_buf);</span><br><span> /* TODO: we could also gather the ECI from here, but we don't need it yet */</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (!vsub->sgs.last_eutran_plmn_present) {</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span> LOGSGC(sgc, LOGL_INFO, "Receiving SGsAP-MO-CSFB-INDICATION without TAI nor "</span><br><span> "E-CGI IEs, and they are not known from previous SGsAP-LOCATION-UPDATE-REQUEST. "</span><br><span> "Fast fallback GERAN->EUTRAN won't be possible!\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ last_eutran_plmn = NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_set_last_used_eutran_plmn_id(vsub, last_eutran_plmn);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Check for lingering connections */</span><br><span> subscr_conn_toss(vsub);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-msc/+/24817">change 24817</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-msc/+/24817"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I203de82accc896c196cb70037af89be6dc826c05 </div>
<div style="display:none"> Gerrit-Change-Number: 24817 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>