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

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Mar 18 19:51:41 MST 2007


Author: bweschke
Date: Sun Mar 18 21:51:41 2007
New Revision: 59039

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59039
Log:
 If the session doesn't process it's events within the max event age expiry time, don't try to process any further events because they may not be there anymore!


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=59039&r1=59038&r2=59039
==============================================================================
--- team/bweschke/eventq-sanity-checks/main/manager.c (original)
+++ team/bweschke/eventq-sanity-checks/main/manager.c Sun Mar 18 21:51:41 2007
@@ -1944,6 +1944,8 @@
 	ast_mutex_lock(&s->__lock);
 	if (s->fd > -1) {
 		time(&currentt);
+		if (s->sessiontimeout < (currentt - maxeventage))
+			ret = -1;
 		if (!s->eventq)
 			s->eventq = master_eventq;
 		while(s->eventq->next) {
@@ -1954,6 +1956,9 @@
 					ret = -1;
 			}
 			unuse_eventqent(s->eventq);
+			time(&currentt);
+			if (s->sessiontimeout < (currentt - maxeventage))
+				ret = -1;
 			s->eventq = eqe;
 		}
 		s->lasteventrun = currentt;



More information about the svn-commits mailing list