aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-12-15 18:55:43 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-02-16 13:29:57 +0100
commit02a79d854575652912b5bbc2184346861d6f1145 (patch)
treee3313256b8cb6297214fd0132a19463fdeb89732
parent4e825b6a68090b472ffed4c14153e38132e48b6c (diff)
libmsc: bssap: Remove fixme and properly update msgb tail
-rw-r--r--src/libmsc/a_iface_bssap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 2947d85e1..224c5c91d 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -308,9 +308,8 @@ static int bssmap_rx_l3_compl(struct osmo_sccp_user *scu, const struct a_conn_in
}
/* Parse Layer 3 Information element */
- /* FIXME: This is probably to hackish, compiler also complains "assignment discards ‘const’ qualifier..." */
msg->l3h = (uint8_t*)TLVP_VAL(tp, GSM0808_IE_LAYER_3_INFORMATION);
- msg->tail = msg->l3h + TLVP_LEN(tp, GSM0808_IE_LAYER_3_INFORMATION);
+ msgb_l3trim(msg, TLVP_LEN(tp, GSM0808_IE_LAYER_3_INFORMATION));
/* Create new subscriber context */
conn = subscr_conn_allocate_a(a_conn_info, network, lac, scu, a_conn_info->conn_id);
@@ -380,7 +379,7 @@ static int bssmap_rx_ciph_compl(struct gsm_subscriber_connection *conn, struct m
if (TLVP_PRESENT(tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS)) {
msg->l3h = (uint8_t*)TLVP_VAL(tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS);
- msg->tail = msg->l3h + TLVP_LEN(tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS);
+ msgb_l3trim(msg, TLVP_LEN(tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS));
} else {
msg = NULL;
}