summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2016-11-25 11:43:56 +0000
committerEric Faurot <eric@cvs.openbsd.org>2016-11-25 11:43:56 +0000
commit48319988e8e51928b3ad58b90069bb92a85eafdd (patch)
tree48ecf03ed2bfc56742c06b095a6685bb9952b344 /usr.sbin
parentfbfc9e3b7cf5434d9c7023d8e18b7ac54f2470ad (diff)
use a specific event to defer the mta connection instead of abusing
the io internal event. ok gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/mta_session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c
index 291b1f6c583..8b407bfaf7c 100644
--- a/usr.sbin/smtpd/mta_session.c
+++ b/usr.sbin/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);