aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-02-21 15:09:12 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-22 08:41:02 +0100
commit37c332e5bfdb9591a1cd3cc6746afffdb1cd13b9 (patch)
treec728088107ecd603b772f978b75b83b6ea1da9b7 /src/osmo-bts-sysmo/l1_if.c
parentbbfd21a36cdd10c3b8d83a329042d9ebfb4c5250 (diff)
agch/rsl: Fix msgb handling for IMMEDIATE ASSIGN
Currently, the msg->data pointer is just set to the IMMEDIATE ASSIGN message and the len is adjusted accordingly. Unfortunately, this leaves l2h (pointing to the RSL header) and l3h (pointing to the FULL_IMM_ASS_INFO IE) in an undefined state (outside of [data, tail]). The code in bts.c accesses the message via msg->data. This patch sets l3h and l2h correctly. msgb_l3() will point to the start of the IMM ASS message and should be used instead of msg->data. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 9eacb2ab..2a14dd05 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -517,7 +517,7 @@ static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1,
if (!msg)
memcpy(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN);
else {
- memcpy(msu_param->u8Buffer, msg->data, msg->len);
+ memcpy(msu_param->u8Buffer, msgb_l3(msg), msgb_l3len(msg));
msgb_free(msg);
}
}