diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-14 19:49:23 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-14 19:49:23 +0000 |
commit | 7069e09093a2a3a63335e62a1bb51a5c6f3428d6 (patch) | |
tree | ecccbf6b44fd4343eb694ba0cb4f9c8fc34dbad5 /usr.sbin/smtpd/smtp.c | |
parent | e056076901aa968d0dba1ad0fa16fb05ec46abeb (diff) |
Set initial session limit so that IMSG_SMTP_ENQUEUE can be satisfied even
in absence of all other real listening sockets.
Spotted by todd@
Diffstat (limited to 'usr.sbin/smtpd/smtp.c')
-rw-r--r-- | usr.sbin/smtpd/smtp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index 4a944a20208..4df8c98bdf5 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.65 2009/12/13 22:02:55 jacekm Exp $ */ +/* $OpenBSD: smtp.c,v 1.66 2009/12/14 19:49:22 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -646,6 +646,10 @@ smtp(struct smtpd *env) signal(SIGPIPE, SIG_IGN); signal(SIGHUP, SIG_IGN); + /* Initial limit for use by IMSG_SMTP_ENQUEUE, will be tuned later once + * the listening sockets arrive. */ + env->sc_maxconn = availdesc() / 2; + config_pipes(env, peers, nitems(peers)); config_peers(env, peers, nitems(peers)); |