Two bugs relating to colnames found by Marquis42 on #asterisk-dev
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155395 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
9483417f74
commit
b19af8bce9
|
@ -376,6 +376,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)) {
|
||||
|
@ -531,6 +533,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;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue