Change in libosmocore[master]: fix

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Nov 30 10:13:48 UTC 2018


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/12041


Change subject: fix
......................................................................

fix

Change-Id: I8fd675a2e0e83a3382aae8cdbf174d42d4958d08
---
M include/osmocom/gsm/gsm0808.h
M src/gsm/gsm0808.c
2 files changed, 14 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/41/12041/1

diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 005ed0c..f22019b 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -171,7 +171,7 @@
 
 struct gsm0808_handover_performed {
 	uint16_t cause;
-	struct gsm0808_cell_id cell;
+	struct gsm0808_cell_id cell_id;
 
 	bool chosen_channel_present;
 	uint8_t chosen_channel;
@@ -184,6 +184,12 @@
 
 	bool speech_codec_chosen_present;
 	struct gsm0808_speech_codec speech_codec_chosen;
+
+	bool lcls_bss_status_present;
+	enum gsm0808_lcls_status lcls_bss_status;
+
+	/* more items are defined in the spec and may be added later */
+	bool more_items; /*< always set this to false */
 };
 struct msgb *gsm0808_create_handover_performed(const struct gsm0808_handover_performed *params);
 
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 96d4d3a..04d786e 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -910,10 +910,10 @@
 	msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_PERFORMED);
 
 	/* Cause, 3.2.2.5 */
-	msgb_tlv_put(msg, GSM0808_IE_CAUSE, params->cause & 0x80 ? 2 : 1, (const uint8_t *)&params->cause);
+	msgb_tlv_put(msg, GSM0808_IE_CAUSE, gsm0808_cause_ext(params->cause) ? 2 : 1, (const uint8_t *)&params->cause);
 
 	/* Cell Identifier, 3.2.2.17 */
-	gsm0808_enc_cell_id(msg, &params->cell);
+	gsm0808_enc_cell_id(msg, &params->cell_id);
 
 	/* Chosen Channel 3.2.2.33 */
 	if (params->chosen_channel_present)
@@ -923,7 +923,7 @@
 	if (params->chosen_encr_alg_present)
 		msgb_tv_put(msg, GSM0808_IE_CHOSEN_ENCR_ALG, params->chosen_encr_alg);
 
-	/* Sspeech Version (chosen) 3.2.2.51 */
+	/* Speech Version (chosen) 3.2.2.51 */
 	if (params->speech_version_chosen_present)
 		msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, params->speech_version_chosen);
 
@@ -931,6 +931,10 @@
 	if (params->speech_codec_chosen_present)
 		gsm0808_enc_speech_codec(msg, &params->speech_codec_chosen);
 
+	/* LCLS-BSS-Status 3.2.2.119 */
+	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));
 

-- 
To view, visit https://gerrit.osmocom.org/12041
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fd675a2e0e83a3382aae8cdbf174d42d4958d08
Gerrit-Change-Number: 12041
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181130/2ec7d8a9/attachment.htm>


More information about the gerrit-log mailing list