aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-08-01 10:52:52 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-08-01 10:56:59 +0200
commita406b167c19cebbdf4285c4b03dd44a34563af1b (patch)
tree130af74b9521cb32ef1e0a2e5f4f9b4c1b12d1c2
parent94d30f2b25c57a5ddcbcce7e63cf3b813587c45f (diff)
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
-rw-r--r--src/osmo-bsc/mgw_endpoint_fsm.c1
1 files changed, 1 insertions, 0 deletions
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;