diff options
author | Matt Jordan <mjordan@digium.com> | 2015-06-26 20:38:58 -0500 |
---|---|---|
committer | Matt Jordan <mjordan@digium.com> | 2015-06-26 21:03:40 -0500 |
commit | 399cd8bcd9e53f30d4a36b67200281407f27798e (patch) | |
tree | 5b6f66efe805be07336d3733a2a67195cfd2e29a /main/pbx.c | |
parent | 0ec461a637ecfdd641cd9a9ce62b766472acde46 (diff) |
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
(cherry picked from commit 96bbcf495a1da9e607d9b04a44b5c4f49e83cc03)
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c index 7686b4b5d..8f5ee646c 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1119,7 +1119,7 @@ static int hintdevice_cmp_multiple(void *obj, void *arg, int flags) right_key = right->hintdevice; /* Fall through */ case OBJ_SEARCH_KEY: - cmp = strcmp(left->hintdevice, right_key); + cmp = strcasecmp(left->hintdevice, right_key); break; case OBJ_SEARCH_PARTIAL_KEY: /* @@ -1143,7 +1143,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; } |