summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mta.c
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-12-14 16:44:15 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-12-14 16:44:15 +0000
commit034a0252a19eeacb9c170b4e9e717523762a88ed (patch)
tree6946497f3035e5820fcaf2bcf9d23cc4b63b108d /usr.sbin/smtpd/mta.c
parent08715c4cca55339b6172439518c6befab992639b (diff)
Impose sessions limit on the delivery sessions (mta and mda).
Diffstat (limited to 'usr.sbin/smtpd/mta.c')
-rw-r--r--usr.sbin/smtpd/mta.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index 660fd113afd..7f014b64e82 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.81 2009/12/12 14:03:59 jacekm Exp $ */
+/* $OpenBSD: mta.c,v 1.82 2009/12/14 16:44:14 jacekm Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -249,9 +249,6 @@ mta_dispatch_runner(int sig, short event, void *p)
TAILQ_INIT(&s->recipients);
TAILQ_INIT(&s->relays);
SPLAY_INSERT(mtatree, &env->mta_sessions, s);
-
- env->stats->mta.sessions++;
- env->stats->mta.sessions_active++;
break;
}
@@ -693,9 +690,11 @@ mta_enter_state(struct mta_session *s, int newstate, void *p)
while ((m = TAILQ_FIRST(&s->recipients)))
mta_message_done(s, m);
+ imsg_compose_event(s->env->sc_ievs[PROC_RUNNER],
+ IMSG_BATCH_DONE, 0, 0, -1, NULL, 0);
+
/* deallocate resources */
SPLAY_REMOVE(mtatree, &s->env->mta_sessions, s);
- s->env->stats->mta.sessions_active--;
while ((relay = TAILQ_FIRST(&s->relays))) {
TAILQ_REMOVE(&s->relays, relay, entry);
free(relay);