summaryrefslogtreecommitdiffstats
path: root/src/sync-mode.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-02-19 23:04:49 +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-02-19 23:04:49 +0000
commit13f4c15f214dd807899c10ebdff74ab5148d650f (patch)
tree50bbeb5ef948e29b40fd2a2833f0b68189fd2a1f /src/sync-mode.c
parent426f53894b8ced42130425c196aea38d115e9e18 (diff)
compose the file descriptor set at initialization stage to save some cycles
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r--src/sync-mode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c
index a81309f..79afcdf 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -25,6 +25,7 @@
#include "conntrackd.h"
#include "us-conntrack.h"
#include "network.h"
+#include "fds.h"
#include "debug.h"
#include <errno.h>
@@ -202,11 +203,9 @@ static int init_sync(void)
return 0;
}
-static int add_fds_to_set_sync(fd_set *readfds)
+static int register_fds_sync(struct fds *fds)
{
- FD_SET(STATE_SYNC(mcast_server->fd), readfds);
-
- return STATE_SYNC(mcast_server->fd);
+ return register_fd(STATE_SYNC(mcast_server->fd), fds);
}
static void run_sync(fd_set *readfds)
@@ -500,7 +499,7 @@ static int event_destroy_sync(struct nf_conntrack *ct)
struct ct_mode sync_mode = {
.init = init_sync,
- .add_fds_to_set = add_fds_to_set_sync,
+ .register_fds = register_fds_sync,
.run = run_sync,
.local = local_handler_sync,
.kill = kill_sync,