[asterisk-commits] tilghman: branch 1.8 r307837 - in /branches/1.8: ./ funcs/func_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 15 01:02:49 CST 2011


Author: tilghman
Date: Tue Feb 15 01:02:45 2011
New Revision: 307837

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307837
Log:
Merged revisions 307836 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r307836 | tilghman | 2011-02-15 01:01:37 -0600 (Tue, 15 Feb 2011) | 8 lines
  
  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.8/   (props changed)
    branches/1.8/funcs/func_odbc.c

Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.

Modified: branches/1.8/funcs/func_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/funcs/func_odbc.c?view=diff&rev=307837&r1=307836&r2=307837
==============================================================================
--- branches/1.8/funcs/func_odbc.c (original)
+++ branches/1.8/funcs/func_odbc.c Tue Feb 15 01:02:45 2011
@@ -336,6 +336,10 @@
 		}
 	}
 
+	if (stmt) {
+		SQLRowCount(stmt, &rows);
+	}
+
 	if (stmt && rows == 0 && ast_str_strlen(insertbuf) != 0) {
 		SQLCloseCursor(stmt);
 		SQLFreeHandle(SQL_HANDLE_STMT, stmt);
@@ -356,7 +360,6 @@
 		}
 	} else if (stmt) {
 		status = "SUCCESS";
-		SQLRowCount(stmt, &rows);
 	}
 
 	AST_RWLIST_UNLOCK(&queries);




More information about the asterisk-commits mailing list