summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2018-01-11 19:04:53 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2018-01-30 18:59:29 +0100
commit18986691ff57d00bb3c98b5be5b6d243fe12f002 (patch)
treef1da4650d50e5fb4f9826daec01275868c972463
parenta5bb47b6e097f234a8ce778acf63ab765c6b8a20 (diff)
libmgcp: Fix rtp range parsing
-rw-r--r--openbsc/src/libmgcp/mgcp_vty.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index 549728ef6..fc91ebcc8 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -422,12 +422,12 @@ static void parse_base(struct mgcp_port_range *range, const char **argv)
range->base_port = port;
}
-static void parse_range(struct mgcp_port_range *range, int range_start, const char **argv)
+static void parse_range(struct mgcp_port_range *range, const char **argv)
{
range->mode = PORT_ALLOC_DYNAMIC;
range->range_start = atoi(argv[0]);
range->range_end = atoi(argv[1]);
- range->last_port = range_start;
+ range->last_port = range->range_start;
}
@@ -458,7 +458,7 @@ DEFUN(cfg_mgcp_rtp_bts_range,
{
struct mgcp_config *cfg = vty->index;
- parse_range(&cfg->bts_ports, cfg->bts_ports.range_start, argv);
+ parse_range(&cfg->bts_ports, argv);
return CMD_SUCCESS;
}
@@ -470,7 +470,7 @@ DEFUN(cfg_mgcp_rtp_net_range,
{
struct mgcp_config *cfg = vty->index;
- parse_range(&cfg->net_ports, cfg->bts_ports.range_start, argv);
+ parse_range(&cfg->net_ports, argv);
return CMD_SUCCESS;
}
@@ -497,7 +497,7 @@ DEFUN(cfg_mgcp_rtp_transcoder_range,
{
struct mgcp_config *cfg = vty->index;
- parse_range(&cfg->transcoder_ports, cfg->bts_ports.range_start, argv);
+ parse_range(&cfg->transcoder_ports, argv);
return CMD_SUCCESS;
}