<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/25825">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm_pchan2chan_nr(): Properly asser if unexpectes pchan is passed<br><br>A bit of archeology, history & recap:<br>ec1b5a0e9e2b6549e0ede48e803095e569997355 (openbsc.git) Adds assert in gsm_ts2chan_nr()<br>2f44693fad8505255293d3ed37dbd4e7cabebd37 (openbsc.git) ASSERT is disabled due to reported hit in octphy and<br>                                                 litecell in gerrit for ec1b5a0e9e2b6549e0ede48e803095e569997355<br>5cef0623ef64bc641d2d29edb1ebaaafcc7c0df6 (osmo-bts,git) minor fixes to gsm_ts2chan_nr() regarding the pragma<br>c9079d91069eaadf181a6e26e3c7205f1f05cbda (osmo-bts.git) GSM_PCHAN_NONE case is introduced in gsm_ts2chan_nr()<br><br>This code has long evolved and robustness has improved, it's not even<br>part of openbsc.git for several years now. Let's always assert if we<br>receive an unexpected value there, since they are all internally handled<br>values and hence we have control over them.<br><br>Related: OS#2906<br>Change-Id: I25e2cf0c922bc9902336e9add75a47535b9355bf<br>---<br>M src/common/lchan.c<br>1 file changed, 1 insertion(+), 8 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/25/25825/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/lchan.c b/src/common/lchan.c</span><br><span>index a3be4ee..e532615 100644</span><br><span>--- a/src/common/lchan.c</span><br><span>+++ b/src/common/lchan.c</span><br><span>@@ -364,14 +364,7 @@</span><br><span>  default:</span><br><span>             LOGP(DRSL, LOGL_ERROR, "Physical channel %s (0x%02x) not expected!\n",</span><br><span>                  gsm_pchan_name(pchan), (int)pchan);</span><br><span style="color: hsl(0, 100%, 40%);">-                /* OSMO_ASSERT(lchan_nr == 0);</span><br><span style="color: hsl(0, 100%, 40%);">-           * FIXME: On octphy and litecell, we hit above assertion (see</span><br><span style="color: hsl(0, 100%, 40%);">-            * Max's comment at https://gerrit.osmocom.org/589 ); disabled</span><br><span style="color: hsl(0, 100%, 40%);">-               * for BTS until this is clarified; remove the #ifdef when it</span><br><span style="color: hsl(0, 100%, 40%);">-            * is fixed. Tracked in OS#2906.</span><br><span style="color: hsl(0, 100%, 40%);">-                 */</span><br><span style="color: hsl(0, 100%, 40%);">-#pragma message "fix caller that passes lchan_nr != 0"</span><br><span style="color: hsl(0, 100%, 40%);">-             cbits = 0x10;</span><br><span style="color: hsl(120, 100%, 40%);">+         OSMO_ASSERT(0);</span><br><span>              break;</span><br><span>       }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/25825">change 25825</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/+/25825"/><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: I25e2cf0c922bc9902336e9add75a47535b9355bf </div>
<div style="display:none"> Gerrit-Change-Number: 25825 </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>