[asterisk-commits] main/pbx: Resolve case sensitivity regression in PBX hints (asterisk[11])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jun 27 10:29:20 CDT 2015
Matt Jordan has submitted this change and it was merged.
Change subject: main/pbx: Resolve case sensitivity regression in PBX hints
......................................................................
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
---
M main/pbx.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, approved
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/main/pbx.c b/main/pbx.c
index 8cff38d..869c273 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -1061,7 +1061,7 @@
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 @@
char *device = arg;
struct ast_hint *hint = data;
- if (!strcmp(candidate->hintdevice, device)
+ if (!strcasecmp(candidate->hintdevice, device)
&& candidate->hint == hint) {
return CMP_MATCH;
}
--
To view, visit https://gerrit.asterisk.org/738
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If5046a7d14097e1e3c12b63092b9584bb1e9cb4c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list