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
This commit is contained in:
Pau Espin 2019-06-26 13:00:52 +02:00
parent 83fd8a5692
commit 7eb6f2cb56
1 changed files with 1 additions and 1 deletions

View File

@ -559,7 +559,7 @@ int check_local_cx_options(void *ctx, const char *options)
* 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;