aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-19 12:34:33 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-19 12:39:55 +0200
commitd9079b192b42594c033a1d00fae31ebae3386db6 (patch)
tree214bc99a51a1cc26ae6e8cf3d660c336ab598c88 /src/common
parent3b02b9ad53aacd83688a8b9e0b3edbaf38b6a4c2 (diff)
gsm_pchan2chan_nr(): Properly assert if unexpected pchan is passed
A bit of archeology, history & recap: ec1b5a0e9e2b6549e0ede48e803095e569997355 (openbsc.git) Adds assert in gsm_ts2chan_nr() 2f44693fad8505255293d3ed37dbd4e7cabebd37 (openbsc.git) ASSERT is disabled due to reported hit in octphy and litecell in gerrit for ec1b5a0e9e2b6549e0ede48e803095e569997355 5cef0623ef64bc641d2d29edb1ebaaafcc7c0df6 (osmo-bts,git) minor fixes to gsm_ts2chan_nr() regarding the pragma c9079d91069eaadf181a6e26e3c7205f1f05cbda (osmo-bts.git) GSM_PCHAN_NONE case is introduced in gsm_ts2chan_nr() This code has long evolved and robustness has improved, it's not even part of openbsc.git for several years now. Let's always assert if we receive an unexpected value there, since they are all internally handled values and hence we have control over them. Related: OS#2906 Change-Id: I25e2cf0c922bc9902336e9add75a47535b9355bf
Diffstat (limited to 'src/common')
-rw-r--r--src/common/lchan.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/common/lchan.c b/src/common/lchan.c
index a3be4ee0..e5326153 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -364,14 +364,7 @@ static uint8_t gsm_pchan2chan_nr(enum gsm_phys_chan_config pchan,
default:
LOGP(DRSL, LOGL_ERROR, "Physical channel %s (0x%02x) not expected!\n",
gsm_pchan_name(pchan), (int)pchan);
- /* OSMO_ASSERT(lchan_nr == 0);
- * FIXME: On octphy and litecell, we hit above assertion (see
- * Max's comment at https://gerrit.osmocom.org/589 ); disabled
- * for BTS until this is clarified; remove the #ifdef when it
- * is fixed. Tracked in OS#2906.
- */
-#pragma message "fix caller that passes lchan_nr != 0"
- cbits = 0x10;
+ OSMO_ASSERT(0);
break;
}