vty: Permit codec-list containing both full-rate and half-rate codecs
Once upon a time, in the old osmo-bsc-sccplite, there was a restriction of not being able to handle configurations with both TCH/F and TCH/H type codecs. This time is long gone, so let's remove this constraint. Change-Id: Iba0822f57c41cedeeb7f069be540f3a851752a23 Closes: OS#2763
This commit is contained in:
parent
519c7e1d42
commit
3849ad4634
|
@ -289,11 +289,8 @@ DEFUN(cfg_net_bsc_codec_list,
|
|||
"List of audio codecs, e.g. fr3 fr1 hr3\n")
|
||||
{
|
||||
struct bsc_msc_data *data = bsc_msc_data(vty);
|
||||
int saw_fr, saw_hr;
|
||||
int i;
|
||||
|
||||
saw_fr = saw_hr = 0;
|
||||
|
||||
/* free the old list... if it exists */
|
||||
if (data->audio_support) {
|
||||
talloc_free(data->audio_support);
|
||||
|
@ -319,19 +316,10 @@ DEFUN(cfg_net_bsc_codec_list,
|
|||
struct gsm_audio_support);
|
||||
data->audio_support[i]->ver = atoi(argv[i] + 2);
|
||||
|
||||
if (strncmp("hr", argv[i], 2) == 0) {
|
||||
if (strncmp("hr", argv[i], 2) == 0)
|
||||
data->audio_support[i]->hr = 1;
|
||||
saw_hr = 1;
|
||||
} else if (strncmp("fr", argv[i], 2) == 0) {
|
||||
else if (strncmp("fr", argv[i], 2) == 0)
|
||||
data->audio_support[i]->hr = 0;
|
||||
saw_fr = 1;
|
||||
}
|
||||
|
||||
if (saw_hr && saw_fr) {
|
||||
vty_out(vty, "Can not have full-rate and half-rate codec.%s",
|
||||
VTY_NEWLINE);
|
||||
return CMD_ERR_INCOMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
return CMD_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue