aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-09-22 16:41:54 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:41:54 +0200
commitf1fb0fa3af174c605f60458388bba61ef4f40fa8 (patch)
tree006e46f78dee0ac14ffd321e0bfae344d8160096 /src/common/rsl.c
parent329085a8ff2c1162a32eb617068fa5614efcde06 (diff)
parentcaa648d92e48a05e676e87b48c21cb0b151c9b4e (diff)
Merge branch '201509-trx-rebase'0.4.0
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 0908f1cc..a225155a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -837,12 +837,12 @@ static int rsl_rx_chan_activ(struct msgb *msg)
}
/* 9.3.52 MultiRate Configuration */
if (TLVP_PRESENT(&tp, RSL_IE_MR_CONFIG)) {
- if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_conf)) {
+ if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) - 1) {
LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n");
return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT);
}
- memcpy(&lchan->mr_conf, TLVP_VAL(&tp, RSL_IE_MR_CONFIG),
- TLVP_LEN(&tp, RSL_IE_MR_CONFIG));
+ memcpy(lchan->mr_bts_lv, TLVP_VAL(&tp, RSL_IE_MR_CONFIG) - 1,
+ TLVP_LEN(&tp, RSL_IE_MR_CONFIG) + 1);
amr_parse_mr_conf(&lchan->tch.amr_mr, TLVP_VAL(&tp, RSL_IE_MR_CONFIG),
TLVP_LEN(&tp, RSL_IE_MR_CONFIG));
amr_log_mr_conf(DRTP, LOGL_DEBUG, gsm_lchan_name(lchan),
@@ -1094,12 +1094,12 @@ static int rsl_rx_mode_modif(struct msgb *msg)
/* 9.3.52 MultiRate Configuration */
if (TLVP_PRESENT(&tp, RSL_IE_MR_CONFIG)) {
- if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_conf)) {
+ if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) - 1) {
LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n");
return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT);
}
- memcpy(&lchan->mr_conf, TLVP_VAL(&tp, RSL_IE_MR_CONFIG),
- TLVP_LEN(&tp, RSL_IE_MR_CONFIG));
+ memcpy(lchan->mr_bts_lv, TLVP_VAL(&tp, RSL_IE_MR_CONFIG) - 1,
+ TLVP_LEN(&tp, RSL_IE_MR_CONFIG) + 1);
amr_parse_mr_conf(&lchan->tch.amr_mr, TLVP_VAL(&tp, RSL_IE_MR_CONFIG),
TLVP_LEN(&tp, RSL_IE_MR_CONFIG));
amr_log_mr_conf(DRTP, LOGL_DEBUG, gsm_lchan_name(lchan),