updates
authorPekka Riikonen <priikone@silcnet.org>
Fri, 15 Jun 2001 10:47:53 +0000 (10:47 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 15 Jun 2001 10:47:53 +0000 (10:47 +0000)
apps/silcd/server.c

index 0a2f11f9f74d2dcaede3f45c6e36c0215d795450..9914f962bd0e08a0fc4807bacc315ecde62db50d 100644 (file)
@@ -1010,6 +1010,9 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection)
      later when outgoing data is available. */
   SILC_REGISTER_CONNECTION_FOR_IO(sock);
 
+  SILC_LOG_INFO(("Incoming connection from %s (%s)", newsocket->hostname,
+                newsocket->ip));
+
   port = server->sockets[fd]->port; /* Listenning port */
 
   /* Check whether this connection is denied to connect to us. */
@@ -1019,6 +1022,8 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection)
                                          port);
   if (deny) {
     /* The connection is denied */
+    SILC_LOG_INFO(("Connection %s (%s) is denied", 
+                   newsocket->hostname, newsocket->ip));
     silc_server_disconnect_remote(server, newsocket, deny->comment ?
                                  deny->comment :
                                  "Server closed connection: "
@@ -1056,9 +1061,6 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection)
 
   /* The connection is allowed */
 
-  SILC_LOG_INFO(("Incoming connection from %s (%s)", newsocket->hostname,
-                newsocket->ip));
-
   /* Allocate internal context for key exchange protocol. This is
      sent as context for the protocol. */
   proto_ctx = silc_calloc(1, sizeof(*proto_ctx));