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

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


Author: tilghman
Date: Tue Feb 15 01:03:44 2011
New Revision: 307838

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

................
  r307837 | tilghman | 2011-02-15 01:02:45 -0600 (Tue, 15 Feb 2011) | 15 lines
  
  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:
    trunk/   (props changed)
    trunk/funcs/func_odbc.c

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

Modified: trunk/funcs/func_odbc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_odbc.c?view=diff&rev=307838&r1=307837&r2=307838
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Tue Feb 15 01:03:44 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