summaryrefslogtreecommitdiffstats
path: root/usr.sbin/smtpd/ioev.c
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2016-11-24 07:57:48 +0000
committereric <eric@openbsd.org>2016-11-24 07:57:48 +0000
commitc57f8f28d76ce9cf9f59a0e970a9845793fc7af4 (patch)
tree56c80cd3db5dbfee8487f13043771e2c1c77104c /usr.sbin/smtpd/ioev.c
parentsync (diff)
downloadwireguard-openbsd-c57f8f28d76ce9cf9f59a0e970a9845793fc7af4.tar.xz
wireguard-openbsd-c57f8f28d76ce9cf9f59a0e970a9845793fc7af4.zip
reset the io event when data is queued.
remove all calls to io_reload() which are now unnecessary. ok gilles@ sunil@
Diffstat (limited to 'usr.sbin/smtpd/ioev.c')
-rw-r--r--usr.sbin/smtpd/ioev.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/ioev.c b/usr.sbin/smtpd/ioev.c
index 1c72ee45873..146c7f18b86 100644
--- a/usr.sbin/smtpd/ioev.c
+++ b/usr.sbin/smtpd/ioev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioev.c,v 1.31 2016/11/22 07:28:42 eric Exp $ */
+/* $OpenBSD: ioev.c,v 1.32 2016/11/24 07:57:48 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -370,13 +370,25 @@ io_set_write(struct io *io)
int
io_write(struct io *io, const void *buf, size_t len)
{
- return iobuf_queue(io->iobuf, buf, len);
+ int r;
+
+ r = iobuf_queue(io->iobuf, buf, len);
+
+ io_reload(io);
+
+ return r;
}
int
io_writev(struct io *io, const struct iovec *iov, int iovcount)
{
- return iobuf_queuev(io->iobuf, iov, iovcount);
+ int r;
+
+ r = iobuf_queuev(io->iobuf, iov, iovcount);
+
+ io_reload(io);
+
+ return r;
}
int