Send empty MOTD if motd file cannot be read.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 24 Apr 2005 21:38:42 +0000 (21:38 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 24 Apr 2005 21:38:42 +0000 (21:38 +0000)
CHANGES
apps/silcd/command.c

diff --git a/CHANGES b/CHANGES
index c2915fcc6f582dfe6bf440d5f20dc2907041be25..0ef111161cab2c84db546ed53bfc1bc30360c153 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Mon Apr 25 00:39:30 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
+
+       * Send empty MOTD reply if MOTD file cannot be read.
+         Affected file silcd/command.c.
+
 Sun Apr 24 12:01:37 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
 
        * Optimized primer number generator to use simpler conversion
index 59e04b3a96abf7f2fa8a35f0a7b24e811f62384e..67e2ad4813e3ce634b2c0cc1324292700002c107 100644 (file)
@@ -2634,8 +2634,13 @@ SILC_SERVER_CMD_FUNC(motd)
       /* Send motd */
       motd = silc_file_readfile(server->config->server_info->motd_file,
                                &motd_len);
-      if (!motd)
+      if (!motd) {
+       /* No motd */
+       silc_server_send_command_reply(server, cmd->sock, SILC_COMMAND_MOTD,
+                                      SILC_STATUS_OK, 0, ident, 1,
+                                      2, idp->data, idp->len);
        goto out;
+      }
 
       motd[motd_len] = 0;
       silc_server_send_command_reply(server, cmd->sock, SILC_COMMAND_MOTD,