<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25167">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">error log: improve lchan lookup error msg<br><br>Looking for a bug, I spread this logging to understand what was<br>happening. Might as well keep it.<br><br>Related: SYS#5559<br>Change-Id: I46b660cd51a41e561712a0bd849ce0ee8d1a9588<br>---<br>M src/osmo-bsc/bts_trx.c<br>1 file changed, 18 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/67/25167/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c</span><br><span>index f183d4b..9f8837b 100644</span><br><span>--- a/src/osmo-bsc/bts_trx.c</span><br><span>+++ b/src/osmo-bsc/bts_trx.c</span><br><span>@@ -183,11 +183,17 @@</span><br><span>            lch_idx = 0;    /* TCH/F */</span><br><span>          ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_TCH_F)</span><br><span>                     || ts->pchan_on_init == GSM_PCHAN_PDCH; /* PDCH? really? */</span><br><span style="color: hsl(120, 100%, 40%);">+                if (!ok)</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr %x cbits %x: ts %s is not capable of GSM_PCHAN_TCH_F\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                            chan_nr, cbits, gsm_ts_and_pchan_name(ts));</span><br><span>          break;</span><br><span>       case ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(0):</span><br><span>     case ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(1):</span><br><span>             lch_idx = cbits & 0x1;      /* TCH/H */</span><br><span>          ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_TCH_H);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (!ok)</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_TCH_H\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                           chan_nr, cbits, gsm_ts_and_pchan_name(ts));</span><br><span>          break;</span><br><span>       case ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(0):</span><br><span>  case ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(1):</span><br><span>@@ -195,6 +201,9 @@</span><br><span>    case ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(3):</span><br><span>          lch_idx = cbits & 0x3;      /* SDCCH/4 */</span><br><span>                ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_CCCH_SDCCH4);</span><br><span style="color: hsl(120, 100%, 40%);">+               if (!ok)</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_CCCH_SDCCH4\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                             chan_nr, cbits, gsm_ts_and_pchan_name(ts));</span><br><span>          break;</span><br><span>       case ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(0):</span><br><span>  case ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(1):</span><br><span>@@ -206,17 +215,26 @@</span><br><span>  case ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(7):</span><br><span>          lch_idx = cbits & 0x7;      /* SDCCH/8 */</span><br><span>                ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_SDCCH8_SACCH8C);</span><br><span style="color: hsl(120, 100%, 40%);">+            if (!ok)</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_SDCCH8_SACCH8C\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                          chan_nr, cbits, gsm_ts_and_pchan_name(ts));</span><br><span>          break;</span><br><span>       case ABIS_RSL_CHAN_NR_CBITS_BCCH:</span><br><span>    case ABIS_RSL_CHAN_NR_CBITS_RACH:</span><br><span>    case ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH:</span><br><span>                lch_idx = 0; /* CCCH? */</span><br><span>             ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_CCCH);</span><br><span style="color: hsl(120, 100%, 40%);">+              if (!ok)</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_CCCH\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                            chan_nr, cbits, gsm_ts_and_pchan_name(ts));</span><br><span>          /* FIXME: we should not return first sdcch4 !!! */</span><br><span>           break;</span><br><span>       case ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH:</span><br><span>               lch_idx = 0;</span><br><span>                 ok = (ts->pchan_on_init == GSM_PCHAN_OSMO_DYN);</span><br><span style="color: hsl(120, 100%, 40%);">+            if (!ok)</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not GSM_PCHAN_OSMO_DYN\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                           chan_nr, cbits, gsm_ts_and_pchan_name(ts));</span><br><span>          break;</span><br><span>       default:</span><br><span>             return NULL;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25167">change 25167</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/+/25167"/><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: I46b660cd51a41e561712a0bd849ce0ee8d1a9588 </div>
<div style="display:none"> Gerrit-Change-Number: 25167 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>