mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-24 21:50:53 +00:00
Revision 189537 was supposed to make 1.4 more correct. Instead, it broke func_odbc. Reverting.
(closes issue #15317, issue #14614) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@204170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -162,23 +162,6 @@ static struct ast_custom_function regex_function = {
|
||||
.read = regex,
|
||||
};
|
||||
|
||||
static int strecmp(const char *pre, const char *post)
|
||||
{
|
||||
int res;
|
||||
for (; *pre && *post; pre++, post++) {
|
||||
if (*pre == '"') {
|
||||
post--;
|
||||
continue;
|
||||
} else if (*pre == '\\') {
|
||||
pre++;
|
||||
}
|
||||
if ((res = strncmp(pre, post, 1))) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
return strncmp(pre, post, 1);
|
||||
}
|
||||
|
||||
static int array(struct ast_channel *chan, char *cmd, char *var,
|
||||
const char *value)
|
||||
{
|
||||
@@ -191,15 +174,6 @@ static int array(struct ast_channel *chan, char *cmd, char *var,
|
||||
char *value2;
|
||||
int i;
|
||||
|
||||
if (chan) {
|
||||
const char *value3;
|
||||
ast_mutex_lock(&chan->lock);
|
||||
if ((value3 = pbx_builtin_getvar_helper(chan, "~ODBCVALUES~")) && strecmp(value3, value) == 0) {
|
||||
value = ast_strdupa(value3);
|
||||
}
|
||||
ast_mutex_unlock(&chan->lock);
|
||||
}
|
||||
|
||||
value2 = ast_strdupa(value);
|
||||
if (!var || !value2)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user