summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/ssl.c')
-rw-r--r--usr.sbin/smtpd/ssl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/ssl.c b/usr.sbin/smtpd/ssl.c
index 3164c776754..e921382392d 100644
--- a/usr.sbin/smtpd/ssl.c
+++ b/usr.sbin/smtpd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.13 2009/04/15 20:34:59 jacekm Exp $ */
+/* $OpenBSD: ssl.c,v 1.14 2009/05/18 20:23:35 jacekm Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -503,8 +503,6 @@ ssl_session_accept(int fd, short event, void *p)
}
}
- event_set(&s->s_bev->ev_read, s->s_fd, EV_READ, ssl_read, s->s_bev);
- event_set(&s->s_bev->ev_write, s->s_fd, EV_WRITE, ssl_write, s->s_bev);
log_info("ssl_session_accept: accepted ssl client");
s->s_flags |= F_SECURE;
@@ -518,7 +516,11 @@ ssl_session_accept(int fd, short event, void *p)
s_smtp.starttls_active++;
}
+ session_bufferevent_new(s);
+ event_set(&s->s_bev->ev_read, s->s_fd, EV_READ, ssl_read, s->s_bev);
+ event_set(&s->s_bev->ev_write, s->s_fd, EV_WRITE, ssl_write, s->s_bev);
session_pickup(s, NULL);
+
return;
retry:
event_add(&s->s_ev, &s->s_tv);