diff options
Diffstat (limited to 'ldpd/packet.c')
| -rw-r--r-- | ldpd/packet.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index df6bd8e57a..be7f2ba649 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -143,7 +143,8 @@ disc_recv_packet(struct thread *thread) struct in_addr lsr_id; /* reschedule read */ - *threadp = thread_add_read(master, disc_recv_packet, threadp, fd); + *threadp = NULL; + thread_add_read(master, disc_recv_packet, threadp, fd, &*threadp); /* setup buffer */ memset(&m, 0, sizeof(m)); @@ -427,7 +428,8 @@ session_read(struct thread *thread) uint16_t pdu_len, msg_len, msg_size, max_pdu_len; int ret; - tcp->rev = thread_add_read(master, session_read, nbr, fd); + tcp->rev = NULL; + thread_add_read(master, session_read, nbr, fd, &tcp->rev); if ((n = read(fd, tcp->rbuf->buf + tcp->rbuf->wpos, sizeof(tcp->rbuf->buf) - tcp->rbuf->wpos)) == -1) { @@ -731,7 +733,8 @@ tcp_new(int fd, struct nbr *nbr) if ((tcp->rbuf = calloc(1, sizeof(struct ibuf_read))) == NULL) fatal(__func__); - tcp->rev = thread_add_read(master, session_read, nbr, tcp->fd); + tcp->rev = NULL; + thread_add_read(master, session_read, nbr, tcp->fd, &tcp->rev); tcp->nbr = nbr; } @@ -777,8 +780,9 @@ pending_conn_new(int fd, int af, union ldpd_addr *addr) pconn->af = af; pconn->addr = *addr; TAILQ_INSERT_TAIL(&global.pending_conns, pconn, entry); - pconn->ev_timeout = thread_add_timer(master, pending_conn_timeout, - pconn, PENDING_CONN_TIMEOUT); + pconn->ev_timeout = NULL; + thread_add_timer(master, pending_conn_timeout, pconn, PENDING_CONN_TIMEOUT, + &pconn->ev_timeout); return (pconn); } |
