fixeria has uploaded this change for review. (
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/55/33155/1
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;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/33155
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If3c2d9d93399411d4466779ce8e8987843b521b1
Gerrit-Change-Number: 33155
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange