Harald Welte has submitted this change and it was merged.

Change subject: L1SAP: Print chan_nr and link_id always as hex
......................................................................


L1SAP: Print chan_nr and link_id always as hex

The RSL Channel ID is best read / interpreted as hex value, not as
decimal, primarily due to the fact that it is a bit-mask of various
fields.

Change-Id: I9b72a67407870b485e7f7e8a72fa1ad30fc8ed4d
---
M src/common/l1sap.c
1 file changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index b6fcad3..7c69561 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -656,7 +656,7 @@
 
        gsm_fn2gsmtime(&g_time, fn);
 
-       DEBUGP(DL1P, "Rx PH-RTS.ind %s chan_nr=%d link_id=%d\n",
+       DEBUGP(DL1P, "Rx PH-RTS.ind %s chan_nr=0x%02x link_id=0x%02xd\n",
                osmo_dump_gsmtime(&g_time), chan_nr, link_id);
 
        /* reuse PH-RTS.ind for PH-DATA.req */
@@ -750,7 +750,7 @@
                        memcpy(p, fill_frame, GSM_MACBLOCK_LEN);
        }
 
-       DEBUGP(DL1P, "Tx PH-DATA.req %02u/%02u/%02u chan_nr=%d link_id=%d\n",
+       DEBUGP(DL1P, "Tx PH-DATA.req %02u/%02u/%02u chan_nr=%02x 
link_id=0x%02x\n",
                g_time.t1, g_time.t2, g_time.t3, chan_nr, link_id);
 
        l1sap_down(trx, l1sap);
@@ -798,7 +798,7 @@
 
        gsm_fn2gsmtime(&g_time, fn);
 
-       DEBUGP(DL1P, "Rx TCH-RTS.ind %s chan_nr=%d\n", 
osmo_dump_gsmtime(&g_time), chan_nr);
+       DEBUGP(DL1P, "Rx TCH-RTS.ind %s chan_nr=0x%02x\n", 
osmo_dump_gsmtime(&g_time), chan_nr);
 
        lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
        if (!lchan)
@@ -851,7 +851,7 @@
        resp_l1sap->u.tch.fn = fn;
        resp_l1sap->u.tch.marker = marker;
 
-       DEBUGP(DL1P, "Tx TCH.req %02u/%02u/%02u chan_nr=%d\n",
+       DEBUGP(DL1P, "Tx TCH.req %02u/%02u/%02u chan_nr=0x%02x\n",
                g_time.t1, g_time.t2, g_time.t3, chan_nr);
 
        l1sap_down(trx, resp_l1sap);
@@ -954,13 +954,13 @@
 
        gsm_fn2gsmtime(&g_time, fn);
 
-       DEBUGP(DL1P, "Rx PH-DATA.ind %s chan_nr=%d link_id=%d\n",
-               osmo_dump_gsmtime(&g_time), chan_nr, link_id);
+       DEBUGP(DL1P, "Rx PH-DATA.ind %s chan_nr=0x%02x link_id=0x%02x len=%d\n",
+               osmo_dump_gsmtime(&g_time), chan_nr, link_id, len);
 
        if (ts_is_pdch(&trx->ts[tn])) {
                lchan = get_lchan_by_chan_nr(trx, chan_nr);
                if (!lchan)
-                       LOGP(DL1P, LOGL_ERROR, "No lchan for chan_nr=%d\n", 
chan_nr);
+                       LOGP(DL1P, LOGL_ERROR, "No lchan for chan_nr=0x%02x\n", 
chan_nr);
                if (lchan && lchan->loopback && !L1SAP_IS_PTCCH(fn)) {
                        /* we are in loopback mode (for BER testing)
                         * mode and need to enqeue the frame to be
@@ -1059,7 +1059,7 @@
 
        gsm_fn2gsmtime(&g_time, fn);
 
-       DEBUGP(DL1P, "Rx TCH.ind %s chan_nr=%d\n", osmo_dump_gsmtime(&g_time), 
chan_nr);
+       DEBUGP(DL1P, "Rx TCH.ind %s chan_nr=0x%02x\n", 
osmo_dump_gsmtime(&g_time), chan_nr);
 
        lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
        if (!lchan)

-- 
To view, visit https://gerrit.osmocom.org/3392
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b72a67407870b485e7f7e8a72fa1ad30fc8ed4d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to