[asterisk-commits] tilghman: branch 1.6.2 r307836 - /branches/1.6.2/funcs/func_odbc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 15 01:01:45 CST 2011
Author: tilghman
Date: Tue Feb 15 01:01:37 2011
New Revision: 307836
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307836
Log:
Need to retrieve the rows affected before using the associated variable.
(closes issue #18795)
Reported by: irroot
Patches:
20110211__issue18795.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman
Modified:
branches/1.6.2/funcs/func_odbc.c
Modified: branches/1.6.2/funcs/func_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/funcs/func_odbc.c?view=diff&rev=307836&r1=307835&r2=307836
==============================================================================
--- branches/1.6.2/funcs/func_odbc.c (original)
+++ branches/1.6.2/funcs/func_odbc.c Tue Feb 15 01:01:37 2011
@@ -325,6 +325,10 @@
}
}
+ if (stmt) {
+ SQLRowCount(stmt, &rows);
+ }
+
if (stmt && rows == 0 && ast_str_strlen(insertbuf) != 0) {
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
@@ -347,7 +351,6 @@
}
} else if (stmt) {
status = "SUCCESS";
- SQLRowCount(stmt, &rows);
}
AST_RWLIST_UNLOCK(&queries);
More information about the asterisk-commits
mailing list