diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-09 23:15:31 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-09 23:15:31 +0000 |
commit | 3370112cc3c9f0446fbe7375bdb32831872814f4 (patch) | |
tree | a5a6b2aa2e8146407b01ae844529692aede2c32d /src/run.c | |
parent | 920b90f2b03c60b6940e83cdce8c4b4bfbbc4268 (diff) | |
download | conntrack-tools-3370112cc3c9f0446fbe7375bdb32831872814f4.tar.gz conntrack-tools-3370112cc3c9f0446fbe7375bdb32831872814f4.zip |
fix statistics mode CPU sucks up (broken with 7178)
Diffstat (limited to 'src/run.c')
-rw-r--r-- | src/run.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); } } |