From f1d7195bd9235d779e8fac7b97368651bffbda7f Mon Sep 17 00:00:00 2001 From: gilles Date: Fri, 25 Nov 2016 17:22:16 +0100 Subject: sync --- smtpd/ioev.c | 4 +++- smtpd/mta_session.c | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'smtpd') 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 * @@ -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 @@ -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); -- cgit v1.2.3-59-g8ed1b