[svn-commits] tilghman: trunk r268731 - /trunk/main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 7 13:59:32 CDT 2010


Author: tilghman
Date: Mon Jun  7 13:59:27 2010
New Revision: 268731

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=268731
Log:
Event well was going dry.

(issue #17234)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=268731&r1=268730&r2=268731
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Jun  7 13:59:27 2010
@@ -1064,6 +1064,11 @@
 	}
 
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&all_events, ev, eq_next) {
+		/* Never release the last event */
+		if (!AST_RWLIST_NEXT(ev, eq_next)) {
+			break;
+		}
+
 		/* 2.5 times whatever the HTTP timeout is (maximum 2.5 hours) is the maximum time that we will definitely cache an event */
 		if (ev->usecount == 0 && ast_tvdiff_sec(now, ev->tv) > (httptimeout > 3600 ? 3600 : httptimeout) * 2.5) {
 			AST_RWLIST_REMOVE_CURRENT(eq_next);




More information about the svn-commits mailing list