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/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/24456 ) Change subject: fixup for gsm48_chan_mode_to_non_vamos() ...................................................................... fixup for gsm48_chan_mode_to_non_vamos() When modifying chan modes, I first thought rather always fail if there is no equivalent mode. That is true for gsm48_chan_mode_to_vamos(), but for a change to non-VAMOS, rather return the unchanged mode for non-VAMOS modes, so that gsm48_chan_mode_to_non_vamos(GSM_CMODE_SIGN) works without failure. This makes more convenient checking, e.g. in osmo-bsc's lchan_fsm.c making sure that a non-VAMOS lchan has a non-VAMOS chan_mode, for all types of lchans. Change-Id: Ibf20f04d167e0e0599012ff530bc17ba8c8ab562 --- M src/gsm/gsm48.c 1 file changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/24456/1 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 02489c9..425cc8e 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -463,22 +463,19 @@ } /*! Translate GSM48_CMODE_SPEECH_*_VAMOS to its corresponding GSM48_CMODE_SPEECH_* non-vamos mode. - * If the mode has no equivalent non-VAMOS mode, return a negative value. + * If the mode has no equivalent non-VAMOS mode, return the unchanged mode. */ enum gsm48_chan_mode gsm48_chan_mode_to_non_vamos(enum gsm48_chan_mode mode) { switch (mode) { case GSM48_CMODE_SPEECH_V1_VAMOS: - case GSM48_CMODE_SPEECH_V1: return GSM48_CMODE_SPEECH_V1; case GSM48_CMODE_SPEECH_V2_VAMOS: - case GSM48_CMODE_SPEECH_EFR: return GSM48_CMODE_SPEECH_EFR; case GSM48_CMODE_SPEECH_V3_VAMOS: - case GSM48_CMODE_SPEECH_AMR: return GSM48_CMODE_SPEECH_AMR; default: - return -1; + return mode; } } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24456 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf20f04d167e0e0599012ff530bc17ba8c8ab562 Gerrit-Change-Number: 24456 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210529/c731827f/attachment.htm>