From 3849ad463489138cbae9bae96296764a10dd0b3a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 12 Feb 2018 14:16:22 +0100 Subject: 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 --- src/osmo-bsc/osmo_bsc_vty.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index fb8b27541..e173b4a7b 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -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; -- cgit v1.2.3