From a406b167c19cebbdf4285c4b03dd44a34563af1b Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 1 Aug 2018 10:52:52 +0200 Subject: 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 --- src/osmo-bsc/mgw_endpoint_fsm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/osmo-bsc/mgw_endpoint_fsm.c') diff --git a/src/osmo-bsc/mgw_endpoint_fsm.c b/src/osmo-bsc/mgw_endpoint_fsm.c index ba10f5c90..18e9dcf5b 100644 --- a/src/osmo-bsc/mgw_endpoint_fsm.c +++ b/src/osmo-bsc/mgw_endpoint_fsm.c @@ -739,6 +739,7 @@ void mgcp_pick_codec(struct mgcp_conn_peer *verb_info, const struct gsm_lchan *l "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; -- cgit v1.2.3