Use the sock for checking maximum number of conns in General
authorPekka Riikonen <priikone@silcnet.org>
Tue, 9 Mar 2004 15:42:49 +0000 (15:42 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 9 Mar 2004 15:42:49 +0000 (15:42 +0000)
case, after all.

CHANGES
apps/silcd/server.c
doc/example_silcd.conf.in

diff --git a/CHANGES b/CHANGES
index 6fb847792ce0dd5abe95c8b382f95b8d345294e6..c30eed16b8e400ef7bf2fe2a0f49757267aad582 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ Tue Mar  9 17:11:58 EET 2004  Pekka Riikonen <priikone@silcnet.org>
          server is full.  Affected files are silcd/server.c,
          server_internal.h and silcd.c.
 
+       * Clarified the connections_max meaning in General section
+         in doc/example_silcd.conf.in.
+
 Wed Mar  3 15:13:49 CET 2004  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed crashbug in connection closing, after a protocol
index 68686e03f9e47cdab78b8a9e47ffa69f48499d82..b8112b3bcf23ff5a1fc700ef11a494faa4c412ec 100644 (file)
@@ -1726,7 +1726,7 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection)
   }
 
   /* Check for maximum allowed connections */
-  if (server->stat.conn_num > server->config->param.connections_max) {
+  if (sock > server->config->param.connections_max) {
     SILC_LOG_ERROR(("Refusing connection, server is full"));
     server->stat.conn_failures++;
     silc_net_close_connection(sock);
index 2610cb23ba34be08461735a7b49472551f5c236e..a5312e248b649a028d973b4118b1e2403db5a3eb 100644 (file)
@@ -48,8 +48,9 @@ General {
        # without FQDN cannot connect to the server.
        #require_reverse_lookup = true;
 
-       # Maximum number of incoming connections allowed to this server.
-       # If more attempt to connect they will be refused.
+       # Maximum number of connections server can handle.  If you want
+       # to limit the number of incoming connections, define the
+       # connections_max in the ConnectionParams.
        connections_max = 1000;
 
        # Maximum number of incoming connections allowed per single host.