diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2019-09-17 16:19:36 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2019-09-17 16:19:36 +0000 |
commit | 98e7ee075697d24b403be25c03393d2bf321d133 (patch) | |
tree | 533e78f0bdd6264595ba7e21ad35a775edbef8ce /usr.sbin/nsd/xfrd-tcp.c | |
parent | 677c7e3573f80df66bf26905b5d3461edec068ce (diff) |
merge 4.2.2
Diffstat (limited to 'usr.sbin/nsd/xfrd-tcp.c')
-rw-r--r-- | usr.sbin/nsd/xfrd-tcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/nsd/xfrd-tcp.c b/usr.sbin/nsd/xfrd-tcp.c index 3c176a38ff8..1ae5311c538 100644 --- a/usr.sbin/nsd/xfrd-tcp.c +++ b/usr.sbin/nsd/xfrd-tcp.c @@ -330,6 +330,7 @@ tcp_pipe_reset_timeout(struct xfrd_tcp_pipeline* tp) tv.tv_usec = 0; if(tp->handler_added) event_del(&tp->handler); + memset(&tp->handler, 0, sizeof(tp->handler)); event_set(&tp->handler, fd, EV_PERSIST|EV_TIMEOUT|EV_READ| (tp->tcp_send_first?EV_WRITE:0), xfrd_handle_tcp_pipe, tp); if(event_base_set(xfrd->event_base, &tp->handler) != 0) @@ -575,6 +576,7 @@ xfrd_tcp_open(struct xfrd_tcp_set* set, struct xfrd_tcp_pipeline* tp, /* set the tcp pipe event */ if(tp->handler_added) event_del(&tp->handler); + memset(&tp->handler, 0, sizeof(tp->handler)); event_set(&tp->handler, fd, EV_PERSIST|EV_TIMEOUT|EV_READ|EV_WRITE, xfrd_handle_tcp_pipe, tp); if(event_base_set(xfrd->event_base, &tp->handler) != 0) |