<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18708">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">scheduler: fix trx_sched_set_lchan(): send TRXC HANDOVER<br><br>The purpose of TRXC [NO]HANDOVER commands is to control handover<br>detection in transceiver. By default, handover detection is<br>enabled on all inactive channels.<br><br>As soon as the BSC activates a logical channel, osmo-bts-trx needs to<br>send TRXC NOHANDOVER to the transceiver, so handover detection is<br>disabled for that channel. As soon as a logical channel is deactivated,<br>osmo-bts-trx needs to send TRXC HANDOVER to the transceiver, so handover<br>detection is activated again.<br><br>As it turns out, osmo-bts-trx never sends TRXC HANDOVER command to<br>the transceiver. Instead, TRXC NOHANDOVER is being sent twice.<br><br>The culprit is trx_sched_set_lchan(): for some reason it sends<br>TRXC NOHANDOVER on channel deactivation, while it's supposed<br>to send TRXC HANDOVER instead. Let's fix this.<br><br>Interestingly enough, in some rare cases this bug triggers another<br>bug (see OS#4586), causing a memory leak in trx_ctrl_cmd_cb().<br><br>Change-Id: Ia106baafc1b7fafb36f11ca378a285d71d1df5a3<br>Related: OS#4592, OS#4586<br>---<br>M src/common/scheduler.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/18708/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/scheduler.c b/src/common/scheduler.c</span><br><span>index 5b398d1..bdd5387 100644</span><br><span>--- a/src/common/scheduler.c</span><br><span>+++ b/src/common/scheduler.c</span><br><span>@@ -1003,9 +1003,9 @@</span><br><span>            }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* disable handover detection (on deactivation) */</span><br><span style="color: hsl(120, 100%, 40%);">+    /* enable handover detection on deactivation */</span><br><span>      if (!active)</span><br><span style="color: hsl(0, 100%, 40%);">-            _sched_act_rach_det(l1t, tn, ss, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+          _sched_act_rach_det(l1t, tn, ss, 1);</span><br><span> </span><br><span>     return rc;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/18708">change 18708</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-bts/+/18708"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia106baafc1b7fafb36f11ca378a285d71d1df5a3 </div>
<div style="display:none"> Gerrit-Change-Number: 18708 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>