Change in osmo-bsc[master]: endpoint_fsm: add missing return in mgcp_pick_codec

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
Wed Aug 1 10:00:49 UTC 2018


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


Change subject: endpoint_fsm: add missing return in mgcp_pick_codec
......................................................................

endpoint_fsm: add missing return in mgcp_pick_codec

The function mgcp_pick_codec is responsible to set the codec
information. In cases whee the codec type can not be determined
correctly it sets verb_info->codecs_len = 0, indicating to the caller
that no codocs are set. However, after that it does not return, it sets
an invalid codec anyway.

- Add missing return to keep the no-codec setting in case of error.

Change-Id: I8d1f8553357b6ad328ab1e5d4525fad0dd282a42
---
M src/osmo-bsc/mgw_endpoint_fsm.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/10286/1

diff --git a/src/osmo-bsc/mgw_endpoint_fsm.c b/src/osmo-bsc/mgw_endpoint_fsm.c
index ba10f5c..18e9dcf 100644
--- a/src/osmo-bsc/mgw_endpoint_fsm.c
+++ b/src/osmo-bsc/mgw_endpoint_fsm.c
@@ -739,6 +739,7 @@
 			  "Unable to determine MGCP codec type for %s in chan-mode %s\n",
 			  gsm_lchant_name(lchan->type), gsm48_chan_mode_name(lchan->tch_mode));
 		verb_info->codecs_len = 0;
+		return;
 	}
 
 	verb_info->codecs[0] = codec;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d1f8553357b6ad328ab1e5d4525fad0dd282a42
Gerrit-Change-Number: 10286
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/20180801/b6e59efd/attachment.htm>


More information about the gerrit-log mailing list