Change in osmo-bsc[master]: error log: improve lchan lookup error msg

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Sun Aug 8 01:56:00 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25167 )


Change subject: error log: improve lchan lookup error msg
......................................................................

error log: improve lchan lookup error msg

Looking for a bug, I spread this logging to understand what was
happening. Might as well keep it.

Related: SYS#5559
Change-Id: I46b660cd51a41e561712a0bd849ce0ee8d1a9588
---
M src/osmo-bsc/bts_trx.c
1 file changed, 18 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/67/25167/1

diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c
index f183d4b..9f8837b 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -183,11 +183,17 @@
 		lch_idx = 0;	/* TCH/F */
 		ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_TCH_F)
 			|| ts->pchan_on_init == GSM_PCHAN_PDCH; /* PDCH? really? */
+		if (!ok)
+			LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr %x cbits %x: ts %s is not capable of GSM_PCHAN_TCH_F\n",
+				chan_nr, cbits, gsm_ts_and_pchan_name(ts));
 		break;
 	case ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(0):
 	case ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(1):
 		lch_idx = cbits & 0x1;	/* TCH/H */
 		ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_TCH_H);
+		if (!ok)
+			LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_TCH_H\n",
+				chan_nr, cbits, gsm_ts_and_pchan_name(ts));
 		break;
 	case ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(0):
 	case ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(1):
@@ -195,6 +201,9 @@
 	case ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(3):
 		lch_idx = cbits & 0x3;	/* SDCCH/4 */
 		ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_CCCH_SDCCH4);
+		if (!ok)
+			LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_CCCH_SDCCH4\n",
+				chan_nr, cbits, gsm_ts_and_pchan_name(ts));
 		break;
 	case ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(0):
 	case ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(1):
@@ -206,17 +215,26 @@
 	case ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(7):
 		lch_idx = cbits & 0x7;	/* SDCCH/8 */
 		ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_SDCCH8_SACCH8C);
+		if (!ok)
+			LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_SDCCH8_SACCH8C\n",
+				chan_nr, cbits, gsm_ts_and_pchan_name(ts));
 		break;
 	case ABIS_RSL_CHAN_NR_CBITS_BCCH:
 	case ABIS_RSL_CHAN_NR_CBITS_RACH:
 	case ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH:
 		lch_idx = 0; /* CCCH? */
 		ok = ts_is_capable_of_pchan(ts, GSM_PCHAN_CCCH);
+		if (!ok)
+			LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not capable of GSM_PCHAN_CCCH\n",
+				chan_nr, cbits, gsm_ts_and_pchan_name(ts));
 		/* FIXME: we should not return first sdcch4 !!! */
 		break;
 	case ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH:
 		lch_idx = 0;
 		ok = (ts->pchan_on_init == GSM_PCHAN_OSMO_DYN);
+		if (!ok)
+			LOG_TRX(trx, DRSL, LOGL_ERROR, "chan_nr 0x%x cbits 0x%x: %s is not GSM_PCHAN_OSMO_DYN\n",
+				chan_nr, cbits, gsm_ts_and_pchan_name(ts));
 		break;
 	default:
 		return NULL;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/25167
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I46b660cd51a41e561712a0bd849ce0ee8d1a9588
Gerrit-Change-Number: 25167
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210808/96d80886/attachment.htm>


More information about the gerrit-log mailing list