main/pbx: Resolve case sensitivity regression in PBX hints
When 8297136f
was merged for ASTERISK-25040, a regression was introduced
surrounding the case sensitivity of device names within hints.
Previously, device names - such as 'sip/foo' - were compared in a case
insensitive fashion. Thus, 'sip/foo' was equivalent to 'SIP/foo'. After
that patch, only the case sensitive name would match, i.e., 'SIP/foo'.
As a result, some dialplan hints stopped working.
This patch re-introduces case insensitive matching for device names in
hints.
ASTERISK-25040
ASTERISK-25202 #close
Change-Id: If5046a7d14097e1e3c12b63092b9584bb1e9cb4c
This commit is contained in:
parent
353dd68cd0
commit
96bbcf495a
|
@ -1061,7 +1061,7 @@ static int hintdevice_cmp_multiple(void *obj, void *arg, int flags)
|
|||
right_key = right->hintdevice;
|
||||
/* Fall through */
|
||||
case OBJ_KEY:
|
||||
cmp = strcmp(left->hintdevice, right_key);
|
||||
cmp = strcasecmp(left->hintdevice, right_key);
|
||||
break;
|
||||
default:
|
||||
ast_assert(0);
|
||||
|
@ -1078,7 +1078,7 @@ static int hintdevice_remove_cb(void *obj, void *arg, void *data, int flags)
|
|||
char *device = arg;
|
||||
struct ast_hint *hint = data;
|
||||
|
||||
if (!strcmp(candidate->hintdevice, device)
|
||||
if (!strcasecmp(candidate->hintdevice, device)
|
||||
&& candidate->hint == hint) {
|
||||
return CMP_MATCH;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue