aboutsummaryrefslogtreecommitdiffstats
path: root/smtpd
diff options
context:
space:
mode:
authorgilles <gilles@poolp.org>2016-11-25 17:22:16 +0100
committergilles <gilles@poolp.org>2016-11-25 17:22:16 +0100
commitf1d7195bd9235d779e8fac7b97368651bffbda7f (patch)
tree7b608d350d9d84ca46bb26d455b1f311e13e6022 /smtpd
parentsync with openbsd (diff)
downloadOpenSMTPD-f1d7195bd9235d779e8fac7b97368651bffbda7f.tar.xz
OpenSMTPD-f1d7195bd9235d779e8fac7b97368651bffbda7f.zip
sync
Diffstat (limited to 'smtpd')
-rw-r--r--smtpd/ioev.c4
-rw-r--r--smtpd/mta_session.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/smtpd/ioev.c b/smtpd/ioev.c
index ad1324ee..6bb06fd0 100644
--- a/smtpd/ioev.c
+++ b/smtpd/ioev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioev.c,v 1.36 2016/11/24 21:25:21 eric Exp $ */
+/* $OpenBSD: ioev.c,v 1.37 2016/11/25 16:17:41 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -685,6 +685,7 @@ io_dispatch(int fd, short ev, void *humppa)
read:
if (ev & EV_READ) {
+ iobuf_normalize(io->iobuf);
if ((n = iobuf_read(io->iobuf, io->sock)) < 0) {
if (n == IOBUF_CLOSED)
io_callback(io, IO_DISCONNECTED);
@@ -914,6 +915,7 @@ io_dispatch_read_ssl(int fd, short event, void *humppa)
}
again:
+ iobuf_normalize(io->iobuf);
switch ((n = iobuf_read_ssl(io->iobuf, (SSL*)io->ssl))) {
case IOBUF_WANT_READ:
io_reset(io, EV_READ, io_dispatch_read_ssl);
diff --git a/smtpd/mta_session.c b/smtpd/mta_session.c
index 291b1f6c..8b407bfa 100644
--- a/smtpd/mta_session.c
+++ b/smtpd/mta_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta_session.c,v 1.93 2016/11/24 20:52:13 eric Exp $ */
+/* $OpenBSD: mta_session.c,v 1.94 2016/11/25 11:43:55 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -114,6 +114,7 @@ struct mta_session {
int use_smtp_tls;
int ready;
+ struct event ev;
struct iobuf iobuf;
struct io io;
int ext;
@@ -236,8 +237,8 @@ mta_session(struct mta_relay *relay, struct mta_route *route)
*/
tv.tv_sec = 0;
tv.tv_usec = 0;
- evtimer_set(&s->io.ev, mta_start, s);
- evtimer_add(&s->io.ev, &tv);
+ evtimer_set(&s->ev, mta_start, s);
+ evtimer_add(&s->ev, &tv);
} else if (waitq_wait(&route->dst->ptrname, mta_on_ptr, s)) {
m_create(p_lka, IMSG_MTA_DNS_PTR, 0, 0, -1);
m_add_id(p_lka, s->id);