summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/control.c
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2010-11-24 23:27:05 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2010-11-24 23:27:05 +0000
commit5665b42b023f140e61b4e89591dbd7b010bde0cf (patch)
tree07372e51cce85f5e2a5d2f91317289e11a926ef5 /usr.sbin/smtpd/control.c
parent1a6ca4c1794c5f70d8e81d3515a8b2fb580e2c02 (diff)
add *maxactive stats
"ok and no need to keep them for yourself" gilles@
Diffstat (limited to 'usr.sbin/smtpd/control.c')
-rw-r--r--usr.sbin/smtpd/control.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index d02eb7af37c..9f377ee6bf2 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.54 2010/10/09 22:05:35 gilles Exp $ */
+/* $OpenBSD: control.c,v 1.55 2010/11/24 23:27:04 todd Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -294,6 +294,8 @@ control_accept(int listenfd, short event, void *arg)
env->stats->control.sessions++;
env->stats->control.sessions_active++;
+ SET_IF_GREATER(env->stats->control.sessions_active,
+ env->stats->control.sessions_maxactive);
if (env->stats->control.sessions_active >= env->sc_maxconn) {
log_warnx("ctl client limit hit, disabling new connections");