aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 22:05:52 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 22:05:52 +0000
commitdd0f7664f51c007c370c5d2def04f3039cc07759 (patch)
treedba730a558b509c393e0552510de576639ef948d /funcs
parent85831b3b7ccd4a95351b1d0dc1813bd6f9149832 (diff)
Merged revisions 155395 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r155395 | tilghman | 2008-11-07 16:03:50 -0600 (Fri, 07 Nov 2008) | 2 lines Two bugs relating to colnames found by Marquis42 on #asterisk-dev ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@155396 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_odbc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index d25a7e93c..cc344be41 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -277,6 +277,8 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
return -1;
}
+ ast_str_reset(colnames);
+
AST_RWLIST_RDLOCK(&queries);
AST_RWLIST_TRAVERSE(&queries, query, list) {
if (!strcmp(query->acf->name, cmd)) {
@@ -420,6 +422,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
colnames->str[colnames->used++] = colname[i];
if (colname[i] == '\0') {
+ colnames->used--;
break;
}
}