Change in osmo-bts[master]: l1sap/scheduler: Consistently print chan_nr as hex number

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Sep 17 18:53:49 UTC 2018


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/11002


Change subject: l1sap/scheduler: Consistently print chan_nr as hex number
......................................................................

l1sap/scheduler: Consistently print chan_nr as hex number

It's very confusing if some log messages log chan_nr as decimal, while
most log it as hexadecimal.  Let's standardize on hex everywhere.

Change-Id: Ia6566d5bbee8124fb7c689c962ce34d714208503
---
M src/common/l1sap.c
M src/common/scheduler.c
2 files changed, 7 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/11002/1

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index b29fcc7..1a7a965 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -508,7 +508,7 @@
 	lchan = get_active_lchan_by_chan_nr(trx, info_meas_ind->chan_nr);
 	if (!lchan) {
 		LOGPFN(DL1P, LOGL_ERROR, info_meas_ind->fn,
-			"No lchan for MPH INFO MEAS IND (chan_nr=%u)\n", info_meas_ind->chan_nr);
+			"No lchan for MPH INFO MEAS IND (chan_nr=0x%02x)\n", info_meas_ind->chan_nr);
 		return 0;
 	}
 
@@ -746,7 +746,7 @@
 	} else if (!(chan_nr & 0x80)) { /* only TCH/F, TCH/H, SDCCH/4 and SDCCH/8 have C5 bit cleared */
 		lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
 		if (!lchan) {
-			LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for PH-RTS.ind (chan_nr=%u)\n", chan_nr);
+			LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for PH-RTS.ind (chan_nr=0x%02x)\n", chan_nr);
 			return 0;
 		}
 		if (L1SAP_IS_LINK_SACCH(link_id)) {
@@ -875,7 +875,7 @@
 
 	lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
 	if (!lchan) {
-		LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for PH-RTS.ind (chan_nr=%u)\n", chan_nr);
+		LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for PH-RTS.ind (chan_nr=0x%02x)\n", chan_nr);
 		return 0;
 	}
 
@@ -1069,7 +1069,7 @@
 
 	lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
 	if (!lchan) {
-		LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for chan_nr=%d\n", chan_nr);
+		LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for chan_nr=0x%02x\n", chan_nr);
 		return 0;
 	}
 
@@ -1137,7 +1137,7 @@
 
 	lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
 	if (!lchan) {
-		LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for TCH.ind (chan_nr=%u)\n", chan_nr);
+		LOGPGT(DL1P, LOGL_ERROR, &g_time, "No lchan for TCH.ind (chan_nr=0x%02x)\n", chan_nr);
 		return 0;
 	}
 
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 8a6c007..65ece7f 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -329,8 +329,8 @@
 found_msg:
 	if ((chan_nr ^ (trx_chan_desc[chan].chan_nr | tn))
 	 || ((link_id & 0xc0) ^ trx_chan_desc[chan].link_id)) {
-		LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=%02x link_id=%02x, "
-			"expecting chan_nr=%02x link_id=%02x.\n", chan_nr, link_id,
+		LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=0x%02x link_id=%02x, "
+			"expecting chan_nr=0x%02x link_id=%02x.\n", chan_nr, link_id,
 			trx_chan_desc[chan].chan_nr | tn, trx_chan_desc[chan].link_id);
 		goto free_msg;
 	}

-- 
To view, visit https://gerrit.osmocom.org/11002
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6566d5bbee8124fb7c689c962ce34d714208503
Gerrit-Change-Number: 11002
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180917/97a4081e/attachment.htm>


More information about the gerrit-log mailing list