<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/22455">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_rsl: check if emergency calling is disabled before premption<br><br>If an emergency call arrives at the BSC while all TCH are busy, one TCH<br>is cleared in favor of the emergency call. However, if emergency calls<br>are disabled (system information), it is still possible that an MS might<br>try an emergency call anyway or that due to interference a regular call<br>might look like an emergency call (channel request reason). In those<br>cases the preemption must not happen and the emergency call must be<br>rejected.<br><br>Change-Id: I1af1f4fefcbe6a886bb5396901ce0cb2368a0e19<br>Related: OS#4976<br>---<br>M src/osmo-bsc/abis_rsl.c<br>1 file changed, 11 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c</span><br><span>index 321bcb4..388e2fc 100644</span><br><span>--- a/src/osmo-bsc/abis_rsl.c</span><br><span>+++ b/src/osmo-bsc/abis_rsl.c</span><br><span>@@ -1546,6 +1546,17 @@</span><br><span>                break;</span><br><span>       }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Block emergency calls if we explicitly disable them via sysinfo. */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (rqd->reason == GSM_CHREQ_REASON_EMERG) {</span><br><span style="color: hsl(120, 100%, 40%);">+               if (bts->si_common.rach_control.t2 & 0x4) {</span><br><span style="color: hsl(120, 100%, 40%);">+                    LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD: MS attempts EMERGENCY CALL although EMERGENCY CALLS "</span><br><span style="color: hsl(120, 100%, 40%);">+                            "are not allowed in sysinfo (spec violation by MS!)\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                    rsl_tx_imm_ass_rej(bts, &rqd->ref);</span><br><span style="color: hsl(120, 100%, 40%);">+                    talloc_free(rqd);</span><br><span style="color: hsl(120, 100%, 40%);">+                     return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* Enqueue request */</span><br><span>        llist_add_tail(&rqd->entry, &bts->chan_rqd_queue);</span><br><span> </span><br><span>@@ -1702,16 +1713,6 @@</span><br><span>         * - If there is still no channel available, try a TCH/F.</span><br><span>     *</span><br><span>    */</span><br><span style="color: hsl(0, 100%, 40%);">-     if (rqd->reason == GSM_CHREQ_REASON_EMERG) {</span><br><span style="color: hsl(0, 100%, 40%);">-         if (bts->si_common.rach_control.t2 & 0x4) {</span><br><span style="color: hsl(0, 100%, 40%);">-                      LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD: MS attempts EMERGENCY CALL although EMERGENCY CALLS "</span><br><span style="color: hsl(0, 100%, 40%);">-                              "are not allowed in sysinfo (spec violation by MS!)\n");</span><br><span style="color: hsl(0, 100%, 40%);">-                      rsl_tx_imm_ass_rej(bts, &rqd->ref);</span><br><span style="color: hsl(0, 100%, 40%);">-                      llist_del(&rqd->entry);</span><br><span style="color: hsl(0, 100%, 40%);">-                  talloc_free(rqd);</span><br><span style="color: hsl(0, 100%, 40%);">-                       return;</span><br><span style="color: hsl(0, 100%, 40%);">-         }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span> </span><br><span>        /* Emergency calls will be put on a free TCH/H or TCH/F directly in the code below, all other channel requests</span><br><span>        * will get an SDCCH first (if possible). */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/22455">change 22455</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/+/22455"/><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: I1af1f4fefcbe6a886bb5396901ce0cb2368a0e19 </div>
<div style="display:none"> Gerrit-Change-Number: 22455 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>