[netfilter-cvslog] r7282 - trunk/conntrack-tools/src

pablo at netfilter.org pablo at netfilter.org
Tue Jan 22 02:28:07 CET 2008


Author: pablo at netfilter.org
Date: 2008-01-22 02:28:07 +0100 (Tue, 22 Jan 2008)
New Revision: 7282

Modified:
   trunk/conntrack-tools/src/run.c
Log:
Max Kellermann <max at duempel.org>:
- Save initialization stage in the __run() loop


Modified: trunk/conntrack-tools/src/run.c
===================================================================
--- trunk/conntrack-tools/src/run.c	2008-01-22 01:25:34 UTC (rev 7281)
+++ trunk/conntrack-tools/src/run.c	2008-01-22 01:28:07 UTC (rev 7282)
@@ -233,19 +233,16 @@
 run(void)
 {
 	struct timeval next_alarm; 
-	struct timeval *next;
+	struct timeval *next = NULL;
 
-	/* initialization: get the next alarm available */
-	next = get_next_alarm_run(&next_alarm);
-
 	while(1) {
-		__run(next);
-
 		sigprocmask(SIG_BLOCK, &STATE(block), NULL);
 		if (next != NULL && !timerisset(next))
 			next = do_alarm_run(&next_alarm);
 		else
 			next = get_next_alarm_run(&next_alarm);
 		sigprocmask(SIG_UNBLOCK, &STATE(block), NULL);
+
+		__run(next);
 	}
 }




More information about the netfilter-cvslog mailing list