[svn-commits] dvossel: branch 1.8 r316215 - /branches/1.8/res/res_odbc.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 3 13:49:53 CDT 2011


Author: dvossel
Date: Tue May  3 13:49:48 2011
New Revision: 316215

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=316215
Log:
Fixes a random crash (NULL reference) in res_odbc.c.

(closes issue #19180)
Reported by: pruiz
Patches: 
      tmp.diff uploaded by pruiz (license 1152)
Tested by: pruiz, seanbright


Modified:
    branches/1.8/res/res_odbc.c

Modified: branches/1.8/res/res_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_odbc.c?view=diff&rev=316215&r1=316214&r2=316215
==============================================================================
--- branches/1.8/res/res_odbc.c (original)
+++ branches/1.8/res/res_odbc.c Tue May  3 13:49:48 2011
@@ -1360,7 +1360,7 @@
 
 	if (obj && ast_test_flag(&flags, RES_ODBC_CONNECTED) && !obj->up) {
 		/* Check if this connection qualifies for reconnection, with negative connection cache time */
-		if (time(NULL) > class->last_negative_connect.tv_sec + class->negative_connection_cache.tv_sec) {
+		if (time(NULL) > obj->parent->last_negative_connect.tv_sec + obj->parent->negative_connection_cache.tv_sec) {
 			odbc_obj_connect(obj);
 		}
 	} else if (obj && ast_test_flag(&flags, RES_ODBC_SANITY_CHECK)) {




More information about the svn-commits mailing list