From 3370112cc3c9f0446fbe7375bdb32831872814f4 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Wed, 9 Jan 2008 23:15:31 +0000 Subject: fix statistics mode CPU sucks up (broken with 7178) --- src/run.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/run.c') diff --git a/src/run.c b/src/run.c index 3dc8ecc..7d166bb 100644 --- a/src/run.c +++ b/src/run.c @@ -227,11 +227,15 @@ void run(void) .tv_sec = 1, .tv_usec = 0 }; + struct timeval *next = &next_alarm; + + if (CONFIG(flags) & CTD_STATS_MODE) + next = NULL; while(1) { - if (__run(&next_alarm)) { + if (__run(next)) { sigprocmask(SIG_BLOCK, &STATE(block), NULL); - do_alarm_run(&next_alarm); + do_alarm_run(next); sigprocmask(SIG_UNBLOCK, &STATE(block), NULL); } } -- cgit v1.2.3