[svn-commits] bweschke: branch bweschke/eventq-sanity-checks r58834 - /team/bweschke/eventq...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Mar 12 10:58:01 MST 2007


Author: bweschke
Date: Mon Mar 12 12:58:01 2007
New Revision: 58834

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58834
Log:
 Getting crazy with the debug info.


Modified:
    team/bweschke/eventq-sanity-checks/main/manager.c

Modified: team/bweschke/eventq-sanity-checks/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/eventq-sanity-checks/main/manager.c?view=diff&rev=58834&r1=58833&r2=58834
==============================================================================
--- team/bweschke/eventq-sanity-checks/main/manager.c (original)
+++ team/bweschke/eventq-sanity-checks/main/manager.c Mon Mar 12 12:58:01 2007
@@ -2215,12 +2215,19 @@
 		/* Purge master event queue of old, unused events, but make sure we
 		   always keep at least one in the queue */
 		eqe = master_eventq;
-		while (master_eventq->next && (!master_eventq->usecount || master_eventq->timeposted < (now - (maxeventage * 1000))) ) {
-			if (master_eventq->timeposted < (now - (maxeventage * 1000)) && option_debug > 2)
-				ast_log(LOG_DEBUG, "Event is beyond max event age. Purging it.\n");
-			eqe = master_eventq;
-			master_eventq = master_eventq->next;
-			free(eqe);
+		if (option_debug > 2) 
+			ast_log(LOG_DEBUG, "Expire time is %d\n", master_eventq->timeposted);
+		while (master_eventq->next) {
+			if (!master_eventq->usecount || master_eventq->timeposted < (now - (maxeventage * 1000))) {
+				if (master_eventq->timeposted < (now - (maxeventage * 1000)) && option_debug > 2)
+					ast_log(LOG_DEBUG, "Event is beyond max event age. Purging it.\n");
+				eqe = master_eventq;
+				master_eventq = master_eventq->next;
+				free(eqe);
+			} else {
+				if (option_debug > 2) 
+					ast_log(LOG_DEBUG, "NOT Removing. usecount is %d and timeposted is %d\n",master_eventq->usecount, master_eventq->timeposted);
+			}
 		}
 		if (option_debug > 2) 
 			ast_log(LOG_DEBUG, "Num sessions after cleanup: %d\n", num_sessions);



More information about the svn-commits mailing list