From e4c2e514d106a1c30ab2c7c2a6e8c93d1ba22bd0 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Tue, 28 Dec 2021 13:00:19 +0100 Subject: [PATCH] Osmo-CC: Fixed RTP port selection option --- src/libosmocc/endpoint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libosmocc/endpoint.c b/src/libosmocc/endpoint.c index 120b53c..c04f087 100644 --- a/src/libosmocc/endpoint.c +++ b/src/libosmocc/endpoint.c @@ -1220,6 +1220,7 @@ static int osmo_cc_set_rtp(osmo_cc_endpoint_t *ep, const char *text) return -EINVAL; } from = from * 10 + *text - '0'; + text++; } /* remove spaces after keyword */ @@ -1235,7 +1236,8 @@ static int osmo_cc_set_rtp(osmo_cc_endpoint_t *ep, const char *text) PDEBUG(DCC, DEBUG_ERROR, "Given 'to' port in '%s' is invalid.\n", text); return -EINVAL; } - from = from * 10 + *text - '0'; + to = to * 10 + *text - '0'; + text++; } osmo_cc_set_rtp_ports(&ep->session_config, from, to);