summaryrefslogtreecommitdiff
path: root/ldpd/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/control.c')
-rw-r--r--ldpd/control.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ldpd/control.c b/ldpd/control.c
index b1260feb68..6bb5204d13 100644
--- a/ldpd/control.c
+++ b/ldpd/control.c
@@ -15,11 +15,11 @@
#define CONTROL_BACKLOG 5
-static void control_accept(struct thread *);
+static void control_accept(struct event *);
static struct ctl_conn *control_connbyfd(int);
static struct ctl_conn *control_connbypid(pid_t);
static void control_close(int);
-static void control_dispatch_imsg(struct thread *);
+static void control_dispatch_imsg(struct event *);
struct ctl_conns ctl_conns;
@@ -90,7 +90,7 @@ control_cleanup(char *path)
}
/* ARGSUSED */
-static void control_accept(struct thread *thread)
+static void control_accept(struct event *thread)
{
int connfd;
socklen_t len;
@@ -98,8 +98,8 @@ static void control_accept(struct thread *thread)
struct ctl_conn *c;
len = sizeof(s_un);
- if ((connfd = accept(THREAD_FD(thread), (struct sockaddr *)&s_un,
- &len)) == -1) {
+ if ((connfd = accept(EVENT_FD(thread), (struct sockaddr *)&s_un,
+ &len)) == -1) {
/*
* Pause accept if we are out of file descriptors, or
* libevent will haunt us here too.
@@ -122,8 +122,8 @@ static void control_accept(struct thread *thread)
imsg_init(&c->iev.ibuf, connfd);
c->iev.handler_read = control_dispatch_imsg;
c->iev.ev_read = NULL;
- thread_add_read(master, c->iev.handler_read, &c->iev, c->iev.ibuf.fd,
- &c->iev.ev_read);
+ event_add_read(master, c->iev.handler_read, &c->iev, c->iev.ibuf.fd,
+ &c->iev.ev_read);
c->iev.handler_write = ldp_write_handler;
c->iev.ev_write = NULL;
@@ -169,17 +169,17 @@ control_close(int fd)
msgbuf_clear(&c->iev.ibuf.w);
TAILQ_REMOVE(&ctl_conns, c, entry);
- THREAD_OFF(c->iev.ev_read);
- THREAD_OFF(c->iev.ev_write);
+ EVENT_OFF(c->iev.ev_read);
+ EVENT_OFF(c->iev.ev_write);
close(c->iev.ibuf.fd);
accept_unpause();
free(c);
}
/* ARGSUSED */
-static void control_dispatch_imsg(struct thread *thread)
+static void control_dispatch_imsg(struct event *thread)
{
- int fd = THREAD_FD(thread);
+ int fd = EVENT_FD(thread);
struct ctl_conn *c;
struct imsg imsg;
ssize_t n;