From 0238920875712b4e51f2d96f2146dc477b2de9d8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 9 Nov 2010 11:24:52 +0000 Subject: Bump up the limit of top number of max connections. Used to be 1024, now is 10240 --- common/smtppass.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/smtppass.c b/common/smtppass.c index ec7386f..9a6b347 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -151,6 +151,9 @@ spthread_t; /* Maximum length of the header argument */ #define MAX_HEADER_LENGTH 1024 +/* Maximum number of concurrent connections */ +#define TOP_MAX_CONNECTIONS 10240 + /* * asctime_r manpage: "stores the string in a user-supplied buffer of * length at least 26". We'll need some more bytes to put timezone @@ -2098,8 +2101,9 @@ int sp_parse_option(const char* name, const char* value) if(strcasecmp(CFG_MAXTHREADS, name) == 0) { g_state.max_threads = strtol(value, &t, 10); - if(*t || g_state.max_threads <= 1 || g_state.max_threads >= 1024) - errx(2, "invalid setting: " CFG_MAXTHREADS " (must be between 1 and 1024)"); + if(*t || g_state.max_threads <= 1 || g_state.max_threads >= TOP_MAX_CONNECTIONS) + errx(2, "invalid setting: " CFG_MAXTHREADS " (must be between 1 and %d)", + TOP_MAX_CONNECTIONS); ret = 1; } -- cgit v1.2.3