summaryrefslogtreecommitdiff
path: root/usr.sbin/slowcgi
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2017-07-04 12:48:37 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2017-07-04 12:48:37 +0000
commit1a18f13f5972ff81c737f7635658ecbaded5aeb9 (patch)
treeff4cbf8bdff1cf026f7041c93cc508b47878c9ca /usr.sbin/slowcgi
parent042833bebe2fc4854f1eba293e69f59e01a73da7 (diff)
consistently use the evtimer wrappers around the connection timeout.
this is instead of setting the timeout up with event_set and event_add, but removing it with evtimer_del. this uses evtimer_set and evtimer_add. prompted by dlg's commit to identd OK dlg
Diffstat (limited to 'usr.sbin/slowcgi')
-rw-r--r--usr.sbin/slowcgi/slowcgi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/slowcgi/slowcgi.c b/usr.sbin/slowcgi/slowcgi.c
index b8629d202cd..a9a90b2db1f 100644
--- a/usr.sbin/slowcgi/slowcgi.c
+++ b/usr.sbin/slowcgi/slowcgi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slowcgi.c,v 1.51 2017/05/26 17:38:46 florian Exp $ */
+/* $OpenBSD: slowcgi.c,v 1.52 2017/07/04 12:48:36 florian Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
* Copyright (c) 2013 Florian Obser <florian@openbsd.org>
@@ -506,8 +506,8 @@ slowcgi_accept(int fd, short events, void *arg)
event_set(&c->ev, s, EV_READ | EV_PERSIST, slowcgi_request, c);
event_add(&c->ev, NULL);
event_set(&c->resp_ev, s, EV_WRITE | EV_PERSIST, slowcgi_response, c);
- event_set(&c->tmo, s, 0, slowcgi_timeout, c);
- event_add(&c->tmo, &timeout);
+ evtimer_set(&c->tmo, slowcgi_timeout, c);
+ evtimer_add(&c->tmo, &timeout);
requests->request = c;
SLIST_INSERT_HEAD(&slowcgi_proc.requests, requests, entry);
}