diff options
Diffstat (limited to 'ldpd/accept.c')
| -rw-r--r-- | ldpd/accept.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ldpd/accept.c b/ldpd/accept.c index 4cb461b908..323558d7fd 100644 --- a/ldpd/accept.c +++ b/ldpd/accept.c @@ -58,7 +58,8 @@ accept_add(int fd, int (*cb)(struct thread *), void *arg) av->arg = arg; LIST_INSERT_HEAD(&accept_queue.queue, av, entry); - av->ev = thread_add_read(master, accept_cb, av, av->fd); + av->ev = NULL; + thread_add_read(master, accept_cb, av, av->fd, &av->ev); log_debug("%s: accepting on fd %d", __func__, fd); @@ -85,7 +86,8 @@ accept_pause(void) { log_debug(__func__); accept_unarm(); - accept_queue.evt = thread_add_timer(master, accept_timeout, NULL, 1); + accept_queue.evt = NULL; + thread_add_timer(master, accept_timeout, NULL, 1, &accept_queue.evt); } void @@ -102,8 +104,10 @@ static void accept_arm(void) { struct accept_ev *av; - LIST_FOREACH(av, &accept_queue.queue, entry) - av->ev = thread_add_read(master, accept_cb, av, av->fd); + LIST_FOREACH(av, &accept_queue.queue, entry) { + av->ev = NULL; + thread_add_read(master, accept_cb, av, av->fd, &av->ev); + } } static void @@ -118,7 +122,8 @@ static int accept_cb(struct thread *thread) { struct accept_ev *av = THREAD_ARG(thread); - av->ev = thread_add_read(master, accept_cb, av, av->fd); + av->ev = NULL; + thread_add_read(master, accept_cb, av, av->fd, &av->ev); av->accept_cb(thread); return (0); |
