<p>Neels Hofmeyr <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/12053">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_bsc_bssap.c: fix incorrect link_id assignment<br><br>Every DTAP message coming from the MSC has a header (see struct<br>dtap_header) that contains message type, length, and link ID.<br>The link ID indicates SAPI and channel type of a given message.<br><br>In dtap_rcvmsg() we allocate a new message buffer and copy the<br>received message into it. The old message buffer is freed by<br>the caller then.<br><br>The link ID value parsed from DTAP header is usually being stored<br>in the control buffer of a message buffer (i.e. msgb->cb). Due to<br>a mistake, it was stored in the old (to be freed) message, while<br>the new (to be forwarded) message always had link_id = 0x00!<br><br>This change resolves the problem with sending SMS during a voice<br>call, when MT signalling goes through FACCH, while MO signalling<br>goes through SACCH.<br><br>Change-Id: I7675e1ce4436fad836778261ac9d446fa8f81483<br>Related: OS#3716<br>---<br>M src/osmo-bsc/osmo_bsc_bssap.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c</span><br><span>index f03fb6e..39425f6 100644</span><br><span>--- a/src/osmo-bsc/osmo_bsc_bssap.c</span><br><span>+++ b/src/osmo-bsc/osmo_bsc_bssap.c</span><br><span>@@ -940,7 +940,7 @@</span><br><span>         /* pass it to the filter for extra actions */</span><br><span>        rc = bsc_scan_msc_msg(conn, gsm48);</span><br><span>  /* Store link_id in msgb->cb */</span><br><span style="color: hsl(0, 100%, 40%);">-      OBSC_LINKID_CB(msg) = header->link_id;</span><br><span style="color: hsl(120, 100%, 40%);">+     OBSC_LINKID_CB(gsm48) = header->link_id;</span><br><span>  dtap_rc = osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_MT_DTAP, gsm48);</span><br><span>      if (rc == BSS_SEND_USSD)</span><br><span>             bsc_send_welcome_ussd(conn);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12053">change 12053</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/12053"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7675e1ce4436fad836778261ac9d446fa8f81483 </div>
<div style="display:none"> Gerrit-Change-Number: 12053 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>