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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13577 ) Change subject: BSSMAP: tweaks ...................................................................... BSSMAP: tweaks Change two instances of Speech Version values to enum gsm0808_permitted_speech. It is often not trivial to find the right values for a uint8_t member, giving the enum name makes it a lot easier/safer to use. In gsm0808_create_handover_required(), use msgb_tv_put() so that the enum's storage size doesn't matter. (Already used for handover_performed) Fix typo in doc of gsm0808_create_handover_required(). Change-Id: I6387836bab76e1fa42daa0f42ab94fc14b70b112 --- M TODO-RELEASE M include/osmocom/gsm/gsm0808.h M src/gsm/gsm0808.c 3 files changed, 6 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/TODO-RELEASE b/TODO-RELEASE index 7c81e32..db3be49 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -19,3 +19,5 @@ osmo_quote_str_buf() truncated string. This is no longer the case. e.g. a string 'truncated' in a 9-char buffer used to print '"trunca"\0', which now becomes '"truncat\0'. libosmocore osmo_quote_str_buf2() New function signature similar to snprintf(), for use with OSMO_STRBUF_APPEND(). +libosmogsm gsm0808_handover_required Storage size changed, speech_version_used now an enum. + gsm0808_handover_performed Storage size changed, speech_version_chosen now an enum. diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index a1345c3..0f2bf1f 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -133,7 +133,7 @@ uint8_t current_channel_type_1; bool speech_version_used_present; - uint8_t speech_version_used; + enum gsm0808_permitted_speech speech_version_used; bool old_bss_to_new_bss_info_present; struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info; @@ -196,7 +196,7 @@ uint8_t chosen_encr_alg; bool speech_version_chosen_present; - uint8_t speech_version_chosen; + enum gsm0808_permitted_speech speech_version_chosen; bool speech_codec_chosen_present; struct gsm0808_speech_codec speech_codec_chosen; diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 4873076..3307a5d 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -822,7 +822,7 @@ /*! Create BSSMAP HANDOVER REQUIRED message. * \param[in] params All information to be encoded. - * \returns newly allocated msgb with BSSMAP REQUIRED message. */ + * \returns newly allocated msgb with BSSMAP HANDOVER REQUIRED message. */ struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_required *params) { struct msgb *msg; @@ -846,7 +846,7 @@ /* Speech Version (Used), 3.2.2.51 */ if (params->speech_version_used_present) - msgb_tv_fixed_put(msg, GSM0808_IE_SPEECH_VERSION, 1, ¶ms->speech_version_used); + msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, params->speech_version_used); if (params->old_bss_to_new_bss_info_present) put_old_bss_to_new_bss_information(msg, ¶ms->old_bss_to_new_bss_info); -- To view, visit https://gerrit.osmocom.org/13577 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6387836bab76e1fa42daa0f42ab94fc14b70b112 Gerrit-Change-Number: 13577 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190430/721e49f3/attachment.htm>