summaryrefslogtreecommitdiff
path: root/src/run.c
diff options
context:
space:
mode:
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-22 01:28:07 +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-22 01:28:07 +0000
commit02ff145c51439873db3cdc192b48e47e2272b0b9 (patch)
tree32a9232aaf63dd504fae633c4f3851acb2f6527b /src/run.c
parent6174e60abbcdc5b62a52fc03c373cee0b77ebcbf (diff)
downloadconntrack-tools-02ff145c51439873db3cdc192b48e47e2272b0b9.tar.gz
conntrack-tools-02ff145c51439873db3cdc192b48e47e2272b0b9.zip
Max Kellermann <max@duempel.org>:
- Save initialization stage in the __run() loop
Diffstat (limited to 'src/run.c')
-rw-r--r--src/run.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/run.c b/src/run.c
index bf2798d..fe57858 100644
--- a/src/run.c
+++ b/src/run.c
@@ -233,19 +233,16 @@ void __attribute__((noreturn))
run(void)
{
struct timeval next_alarm;
- struct timeval *next;
-
- /* initialization: get the next alarm available */
- next = get_next_alarm_run(&next_alarm);
+ struct timeval *next = NULL;
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);
}
}