Harald Welte has submitted this change and it was merged. Change subject: l1sap/osmo-bts-sysmo: Improve logging ......................................................................
l1sap/osmo-bts-sysmo: Improve logging Change-Id: I339db0e5f3fd5e44bac974f2447afc80388802af --- M src/common/l1sap.c 1 file changed, 23 insertions(+), 12 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 97cbac1..21d9dc6 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -500,12 +500,16 @@ struct bts_ul_meas ulm; struct gsm_lchan *lchan; - DEBUGP(DL1P, "MPH_INFO meas ind chan_nr=0x%02x\n", - info_meas_ind->chan_nr); - lchan = get_active_lchan_by_chan_nr(trx, info_meas_ind->chan_nr); - if (!lchan) + if (!lchan) { + LOGP(DL1P, LOGL_ERROR, "No lchan for MPH INFO MEAS IND (chan_nr=%u)\n", + info_meas_ind->chan_nr); return 0; + } + + DEBUGP(DL1P, "%s MPH_INFO meas ind, ta_offs_qbits=%d, ber10k=%d, inv_rssi=%u\n", + gsm_lchan_name(lchan), info_meas_ind->ta_offs_qbits, + info_meas_ind->ber10k, info_meas_ind->inv_rssi); /* in the GPRS case we are not interested in measurement * processing. The PCU will take care of it */ @@ -727,8 +731,10 @@ memcpy(p, fill_frame, GSM_MACBLOCK_LEN); } 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) + if (!lchan) { + LOGP(DL1P, LOGL_ERROR, "No lchan for PH-RTS.ind (chan_nr=%u)\n", chan_nr); return 0; + } if (L1SAP_IS_LINK_SACCH(link_id)) { p = msgb_put(msg, GSM_MACBLOCK_LEN); /* L1-header, if not set/modified by layer 1 */ @@ -779,8 +785,8 @@ memcpy(p, fill_frame, GSM_MACBLOCK_LEN); } - 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); + DEBUGP(DL1P, "Tx PH-DATA.req %s chan_nr=0x%02x link_id=0x%02x\n", + osmo_dump_gsmtime(&g_time), chan_nr, link_id); l1sap_down(trx, l1sap); @@ -830,8 +836,10 @@ 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) + if (!lchan) { + LOGP(DL1P, LOGL_ERROR, "No lchan for PH-RTS.ind (chan_nr=%u)\n", chan_nr); return 0; + } if (!lchan->loopback && lchan->abis_ip.rtp_socket) { osmo_rtp_socket_poll(lchan->abis_ip.rtp_socket); @@ -880,8 +888,7 @@ resp_l1sap->u.tch.fn = fn; resp_l1sap->u.tch.marker = marker; - DEBUGP(DL1P, "Tx TCH.req %02u/%02u/%02u chan_nr=0x%02x\n", - g_time.t1, g_time.t2, g_time.t3, chan_nr); + DEBUGP(DL1P, "Tx TCH.req %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr); l1sap_down(trx, resp_l1sap); @@ -1024,8 +1031,10 @@ } lchan = get_active_lchan_by_chan_nr(trx, chan_nr); - if (!lchan) + if (!lchan) { + LOGP(DL1P, LOGL_ERROR, "No lchan for chan_nr=%d\n", chan_nr); return 0; + } /* bad frame */ if (len == 0) { @@ -1091,8 +1100,10 @@ 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) + if (!lchan) { + LOGP(DL1P, LOGL_ERROR, "No lchan for TCH.ind (chan_nr=%u)\n", chan_nr); return 0; + } msgb_pull(msg, sizeof(*l1sap)); -- To view, visit https://gerrit.osmocom.org/3038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I339db0e5f3fd5e44bac974f2447afc80388802af Gerrit-PatchSet: 3 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