pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/14597


Change subject: mgw: Make check of duplicated LCO fields case insensitive
......................................................................

mgw: Make check of duplicated LCO fields case insensitive

Otherwise it would not catch a duplicate if first the param is
introduced in upper case and later in lower case, or the other way
around.

MGCP RFC3435 (https://tools.ietf.org/html/rfc3435) states almost all
text has to be handled in a case-insensitive way, except SDP parts.

Related: OS#4001
Change-Id: I254bfa3a2d2562441ca3a576cc8e1e7967d9c495
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/97/14597/1

diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 460bb7b..b4ebe30 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -559,7 +559,7 @@
                 * before. If yes, we must bail, an LCO must only appear once
                 * in the LCO string */
                for (i = 0; i < lco_seen_n; i++) {
-                       if (strcmp(lco_seen[i], lco_identifier) == 0)
+                       if (strcasecmp(lco_seen[i], lco_identifier) == 0)
                                goto error;
                }
                lco_seen[lco_seen_n] = lco_identifier;

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/14597
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I254bfa3a2d2562441ca3a576cc8e1e7967d9c495
Gerrit-Change-Number: 14597
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to