aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_odbc.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-29 19:36:01 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-29 19:36:01 +0000
commit3995fab6fbe319f4084aa42ea5e13d5251a247e5 (patch)
treeaaaac26e4bf6dd8631b5cb228d52f804de74a88d /funcs/func_odbc.c
parentaf62815753a3265c74fca014b0c1b03cf78d9315 (diff)
Revision 189537 was supposed to make 1.4 more correct. Instead, it broke func_odbc. Reverting.
(closes issue #15317, issue #14614) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@204170 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_odbc.c')
-rw-r--r--funcs/func_odbc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 5052d1c17..49007d792 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -227,9 +227,6 @@ static int acf_odbc_read(struct ast_channel *chan, char *cmd, char *s, char *buf
SQLSMALLINT colcount=0;
SQLLEN indicator;
- /* Reset, in case of an error */
- pbx_builtin_setvar_helper(chan, "~ODBCVALUES~", "");
-
AST_LIST_LOCK(&queries);
AST_LIST_TRAVERSE(&queries, query, list) {
if (!strcmp(query->acf->name, cmd)) {
@@ -348,9 +345,9 @@ static int acf_odbc_read(struct ast_channel *chan, char *cmd, char *s, char *buf
return -1;
}
- /* Copy data, encoding '\', ',', '"', and '|' for the argument parser */
+ /* Copy data, encoding '\' and ',' for the argument parser */
for (i = 0; i < sizeof(coldata); i++) {
- if (escapecommas && strchr("\\,|\"", coldata[i])) {
+ if (escapecommas && (coldata[i] == '\\' || coldata[i] == ',')) {
buf[buflen++] = '\\';
}
buf[buflen++] = coldata[i];
@@ -371,10 +368,6 @@ static int acf_odbc_read(struct ast_channel *chan, char *cmd, char *s, char *buf
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
-
- /* Pass an unadulterated string to ARRAY, if needed. This is only needed
- * in 1.4, because of the misfeature in Set. */
- pbx_builtin_setvar_helper(chan, "~ODBCVALUES~", buf);
if (chan)
ast_autoservice_stop(chan);
if (bogus_chan)