laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33155 )
Change subject: osmo-bts-trx: tx_pdtch_fn(): use msgb_l2len() ......................................................................
osmo-bts-trx: tx_pdtch_fn(): use msgb_l2len()
Change-Id: If3c2d9d93399411d4466779ce8e8987843b521b1 --- M src/osmo-bts-trx/sched_lchan_pdtch.c 1 file changed, 12 insertions(+), 3 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c index 5ff7229..1701aaf 100644 --- a/src/osmo-bts-trx/sched_lchan_pdtch.c +++ b/src/osmo-bts-trx/sched_lchan_pdtch.c @@ -166,14 +166,14 @@ /* BURST BYPASS */
/* encode bursts */ - rc = gsm0503_pdtch_egprs_encode(bursts_p, msg->l2h, msg->tail - msg->l2h); + rc = gsm0503_pdtch_egprs_encode(bursts_p, msg->l2h, msgb_l2len(msg)); if (rc < 0) - rc = gsm0503_pdtch_encode(bursts_p, msg->l2h, msg->tail - msg->l2h); + rc = gsm0503_pdtch_encode(bursts_p, msg->l2h, msgb_l2len(msg));
/* check validity of message */ if (rc < 0) { LOGL1SB(DL1P, LOGL_FATAL, l1ts, br, "Prim invalid length, please FIX! " - "(len=%ld)\n", (long)(msg->tail - msg->l2h)); + "(len=%u)\n", msgb_l2len(msg)); /* free message */ msgb_free(msg); return -EINVAL;