summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-08-28 01:08:38 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-08-28 19:41:06 +0000
commit43c266f6c6419e97d8097cb656d1aee4e3eeebea (patch)
tree2acfcaa82901f15cb1fd922848ad8a95a2fcdf05
parent77ae45d22f49ee712850e3b5d4c16112dca134d0 (diff)
gsm0808: inter-bsc HO messages: add missing BSSMAP header, x4
Change-Id: I9e128ba775227de5e4010f024338a78584f777ea
-rw-r--r--src/gsm/gsm0808.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index a90aa227..8c2d1436 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -763,6 +763,9 @@ struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t
if (chosen_speech_version != 0)
msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, chosen_speech_version);
+ /* prepend header with final length */
+ msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
+
return msg;
}
@@ -780,6 +783,9 @@ struct msgb *gsm0808_create_handover_detect()
/* Message Type, 3.2.2.1 */
msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_DETECT);
+ /* prepend header with final length */
+ msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
+
return msg;
}
@@ -816,6 +822,9 @@ struct msgb *gsm0808_create_handover_complete(const struct gsm0808_handover_comp
if (params->lcls_bss_status_present)
msgb_tv_put(msg, GSM0808_IE_LCLS_BSS_STATUS, params->lcls_bss_status);
+ /* prepend header with final length */
+ msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
+
return msg;
}
@@ -843,6 +852,9 @@ struct msgb *gsm0808_create_handover_failure(const struct gsm0808_handover_failu
if (params->codec_list_bss_supported.len)
gsm0808_enc_speech_codec_list(msg, &params->codec_list_bss_supported);
+ /* prepend header with final length */
+ msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
+
return msg;
}