pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34141 )


Change subject: l1gprs: Improve logging fn and tn in BLOCK.req
......................................................................

l1gprs: Improve logging fn and tn in BLOCK.req

Change-Id: Iba29d88770e79fee0e4ac3c8f4e833907afa5b52
---
M src/shared/l1gprs.c
1 file changed, 18 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/41/34141/1

diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c
index 878bc80..ff726ae 100644
--- a/src/shared/l1gprs.c
+++ b/src/shared/l1gprs.c
@@ -610,6 +610,7 @@
        const struct l1ctl_gprs_ul_block_req *l1br = (void *)msg->l1h;
        const struct l1gprs_pdch *pdch = NULL;
        size_t data_len;
+       uint32_t fn;

        OSMO_ASSERT(l1br != NULL);

@@ -619,10 +620,11 @@
                          msgb_l1len(msg), sizeof(*l1br));
                return -EINVAL;
        }
+       fn = ntohl(l1br->hdr.fn);
        if (OSMO_UNLIKELY(l1br->hdr.tn >= ARRAY_SIZE(gprs->pdch))) {
                LOGP_GPRS(gprs, LOGL_ERROR,
-                         "Rx malformed UL BLOCK.req (tn=%u)\n",
-                         l1br->hdr.tn);
+                         "Rx malformed UL BLOCK.req (fn=%u, tn=%u)\n",
+                         fn, l1br->hdr.tn);
                return -EINVAL;
        }

@@ -630,18 +632,19 @@
        data_len = msgb_l1len(msg) - sizeof(*l1br);

        LOGP_PDCH(pdch, LOGL_DEBUG,
-                 "Rx UL BLOCK.req (fn=%u, len=%zu): %s\n",
-                 ntohl(l1br->hdr.fn), data_len, osmo_hexdump(l1br->data, 
data_len));
+                 "Rx UL BLOCK.req (fn=%u, tn=%u, len=%zu): %s\n",
+                 fn, l1br->hdr.tn, data_len, osmo_hexdump(l1br->data, 
data_len));

        if ((pdch->ul_tbf_count == 0) && (pdch->dl_tbf_count == 0)) {
                LOGP_PDCH(pdch, LOGL_ERROR,
-                         "Rx UL BLOCK.req, but this PDCH has no configured 
TBFs\n");
+                         "Rx UL BLOCK.req (fn=%u, tn=%u, len=%zu), but this 
PDCH has no configured TBFs\n",
+                         fn, l1br->hdr.tn, data_len);
                return -EINVAL;
        }

        *req = (struct l1gprs_prim_ul_block_req) {
                .hdr = {
-                       .fn = ntohl(l1br->hdr.fn),
+                       .fn = fn,
                        .tn = l1br->hdr.tn,
                },
                .data = &l1br->data[0],

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iba29d88770e79fee0e4ac3c8f4e833907afa5b52
Gerrit-Change-Number: 34141
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to