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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 15 12:16:00 CDT 2008


Author: tilghman
Date: Wed Oct 15 12:16:00 2008
New Revision: 149640

URL: http://svn.digium.com/view/asterisk?view=rev&rev=149640
Log:
Only set buf to blank before the goto.

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=149640&r1=149639&r2=149640
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Wed Oct 15 12:16:00 2008
@@ -452,6 +452,7 @@
 			if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 				ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql->str);
 				y = -1;
+				buf[0] = '\0';
 				goto end_acf_read;
 			}
 
@@ -520,8 +521,6 @@
 		}
 		odbc_store->data = resultset;
 		ast_channel_datastore_add(chan, odbc_store);
-	} else {
-		buf[0] = '\0';
 	}
 	SQLCloseCursor(stmt);
 	SQLFreeHandle(SQL_HANDLE_STMT, stmt);




More information about the asterisk-commits mailing list