summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/xfrd-tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/nsd/xfrd-tcp.c')
-rw-r--r--usr.sbin/nsd/xfrd-tcp.c2
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)