<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/26090">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">scheduler: Fix FACCH msg with l2len==0 going to lower layers and logging errors<br><br>Recent commit (see below) changed a check to avoid weird results for msg<br>which had l2h=NULL, since l2len would return unexpected results there.<br>However, some code branches like FACCH or TCH seem to be always setting<br>l2h even if len=0. Hence, we must test either of the 2 scenarios (null<br>pointer and l2len()).<br><br>This commit fixes the following message appearing all the time during<br>calls:<br>"""<br>TCH/F: Prim has odd len=0 != 23<br>"""<br><br>Fixes: fb905b8d235ff2efe6c1cd9fde2b488b311c1cd7<br>Related: SYS#5676<br>Related: SYS#4919<br>Change-Id: I43152bc8484a35cd004d3303d3a6e6efcdefa890<br>---<br>M src/common/scheduler.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/26090/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 0388445..ba5c18a 100644</span><br><span>--- a/src/common/scheduler.c</span><br><span>+++ b/src/common/scheduler.c</span><br><span>@@ -869,7 +869,7 @@</span><br><span>      OSMO_ASSERT(l1sap->oph.msg);</span><br><span> </span><br><span>  /* ignore empty frame */</span><br><span style="color: hsl(0, 100%, 40%);">-        if (!l1sap->oph.msg->l2h) {</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!l1sap->oph.msg->l2h || msgb_l2len(l1sap->oph.msg) == 0) {</span><br><span>              msgb_free(l1sap->oph.msg);</span><br><span>                return 0;</span><br><span>    }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/26090">change 26090</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/+/26090"/><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: I43152bc8484a35cd004d3303d3a6e6efcdefa890 </div>
<div style="display:none"> Gerrit-Change-Number: 26090 </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>