Cannot close itself.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 7 Sep 2002 09:21:24 +0000 (09:21 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 7 Sep 2002 09:21:24 +0000 (09:21 +0000)
apps/silcd/command.c

index 49904b7235c5cbf11c965c4ff572bef1facacc40..2790042ee907814db0965777dfd8ac5a350a8c06 100644 (file)
@@ -6038,6 +6038,12 @@ SILC_SERVER_CMD_FUNC(close)
     goto out;
   }
 
+  if (server_entry == server->id_entry) {
+    silc_server_command_send_status_reply(cmd, SILC_COMMAND_PRIV_CLOSE,
+                                         SILC_STATUS_ERR_NO_SERVER_ID, 0);
+    goto out;
+  }
+
   /* Send reply to the sender */
   silc_server_command_send_status_reply(cmd, SILC_COMMAND_PRIV_CLOSE,
                                        SILC_STATUS_OK, 0);