summaryrefslogtreecommitdiff
path: root/funcs/func_strings.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-10-29 21:27:09 +0000
committerMark Michelson <mmichelson@digium.com>2012-10-29 21:27:09 +0000
commitda85f8489f76d50989f1f030eea7b13dc1fda52d (patch)
tree2d73dea0a4ccd82b65bc8f35012cf1e5a66c2a8e /funcs/func_strings.c
parent1eb14dbff8bb10caba4e7bd6ebb284056d328821 (diff)
Make evaluation of channel variables consistently case-sensitive.
Due to inconsistencies in how variable names were evaluated, the decision was made to make all evaluations case-sensitive. See the UPGRADE.txt file or https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity for more details. (closes issue ASTERISK-20163) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2160 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_strings.c')
-rw-r--r--funcs/func_strings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 2ba1d535b..9e486d6be 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -998,7 +998,7 @@ static void clearvar_prefix(struct ast_channel *chan, const char *prefix)
struct ast_var_t *var;
int len = strlen(prefix);
AST_LIST_TRAVERSE_SAFE_BEGIN(ast_channel_varshead(chan), var, entries) {
- if (strncasecmp(prefix, ast_var_name(var), len) == 0) {
+ if (strncmp(prefix, ast_var_name(var), len) == 0) {
AST_LIST_REMOVE_CURRENT(entries);
ast_free(var);
}
@@ -1098,7 +1098,7 @@ static int hashkeys_read(struct ast_channel *chan, const char *cmd, char *data,
memset(buf, 0, len);
AST_LIST_TRAVERSE(ast_channel_varshead(chan), newvar, entries) {
- if (strncasecmp(ast_str_buffer(prefix), ast_var_name(newvar), ast_str_strlen(prefix)) == 0) {
+ if (strncmp(ast_str_buffer(prefix), ast_var_name(newvar), ast_str_strlen(prefix)) == 0) {
/* Copy everything after the prefix */
strncat(buf, ast_var_name(newvar) + ast_str_strlen(prefix), len - strlen(buf) - 1);
/* Trim the trailing ~ */
@@ -1119,7 +1119,7 @@ static int hashkeys_read2(struct ast_channel *chan, const char *cmd, char *data,
ast_str_set(&prefix, -1, HASH_PREFIX, data);
AST_LIST_TRAVERSE(ast_channel_varshead(chan), newvar, entries) {
- if (strncasecmp(ast_str_buffer(prefix), ast_var_name(newvar), ast_str_strlen(prefix)) == 0) {
+ if (strncmp(ast_str_buffer(prefix), ast_var_name(newvar), ast_str_strlen(prefix)) == 0) {
/* Copy everything after the prefix */
ast_str_append(buf, len, "%s", ast_var_name(newvar) + ast_str_strlen(prefix));
/* Trim the trailing ~ */