[asterisk-commits] tilghman: trunk r155395 - /trunk/funcs/func_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 7 16:03:51 CST 2008


Author: tilghman
Date: Fri Nov  7 16:03:50 2008
New Revision: 155395

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155395
Log:
Two bugs relating to colnames found by Marquis42 on #asterisk-dev

Modified:
    trunk/funcs/func_odbc.c

Modified: trunk/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_odbc.c?view=diff&rev=155395&r1=155394&r2=155395
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Fri Nov  7 16:03:50 2008
@@ -376,6 +376,8 @@
 		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 @@
 					colnames->str[colnames->used++] = colname[i];
 
 					if (colname[i] == '\0') {
+						colnames->used--;
 						break;
 					}
 				}




More information about the asterisk-commits mailing list