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
This commit is contained in:
parent
94d30f2b25
commit
a406b167c1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue