summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2010-11-09 11:24:52 +0000
committerStef Walter <stef@thewalter.net>2011-01-23 15:47:45 -0600
commit0238920875712b4e51f2d96f2146dc477b2de9d8 (patch)
tree0fb5842be3ba96d706156598de1a2228e1bd96a3
parent1e7189ed5c2e0462b740b6421d8595f91926bda9 (diff)
Bump up the limit of top number of max connections.
Used to be 1024, now is 10240
-rw-r--r--common/smtppass.c8
1 files 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;
}