summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-11-16 10:38:12 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-11-16 10:38:12 +0000
commit2c4f9f5e7d0a36b9e05fb6c3a79c8b93f9f35731 (patch)
tree3b2e72fe25e16a43e271e74f6a47dacae82f0bc3 /usr.sbin/smtpd
parente1d073c03fdaafa8d6fcc37bb549eb0aaf07d3de (diff)
Kill dead code.
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/smtp_session.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 622b08cdce2..03b5a4aa4a5 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.125 2009/11/13 11:40:06 jacekm Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.126 2009/11/16 10:38:11 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -966,24 +966,15 @@ session_destroy(struct session *s)
if (s->s_fd != -1 && close(s->s_fd) == -1)
fatal("session_destroy: close");
- switch (smtpd_process) {
- case PROC_MTA:
- s->s_env->stats->mta.sessions_active--;
- break;
- case PROC_SMTP:
- s->s_env->stats->smtp.sessions_active--;
- if (s->s_env->stats->smtp.sessions_active < s->s_env->sc_maxconn &&
- !(s->s_msg.flags & F_MESSAGE_ENQUEUED)) {
- /*
- * if our session_destroy occurs because of a configuration
- * reload, our listener no longer exist and s->s_l is NULL.
- */
- if (s->s_l != NULL)
- event_add(&s->s_l->ev, NULL);
- }
- break;
- default:
- fatalx("session_destroy: cannot be called from this process");
+ s->s_env->stats->smtp.sessions_active--;
+ if (s->s_env->stats->smtp.sessions_active < s->s_env->sc_maxconn &&
+ !(s->s_msg.flags & F_MESSAGE_ENQUEUED)) {
+ /*
+ * if our session_destroy occurs because of a configuration
+ * reload, our listener no longer exist and s->s_l is NULL.
+ */
+ if (s->s_l != NULL)
+ event_add(&s->s_l->ev, NULL);
}
SPLAY_REMOVE(sessiontree, &s->s_env->sc_sessions, s);
@@ -1075,11 +1066,6 @@ session_respond(struct session *s, char *fmt, ...)
fatal("session_respond: evbuffer_add_vprintf failed");
va_end(ap);
- if (smtpd_process == PROC_MTA) {
- bufferevent_enable(s->s_bev, EV_WRITE);
- return;
- }
-
bufferevent_disable(s->s_bev, EV_READ);
/*