From: Pekka Riikonen Date: Sun, 24 Apr 2005 21:38:42 +0000 (+0000) Subject: Send empty MOTD if motd file cannot be read. X-Git-Tag: silc.server.0.9.20~13 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=814257e7cadbd9b6f483ce3b6f1d9cb8e844d0d3;p=silc.git Send empty MOTD if motd file cannot be read. --- diff --git a/CHANGES b/CHANGES index c2915fcc..0ef11116 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Mon Apr 25 00:39:30 EEST 2005 Pekka Riikonen + + * 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 * Optimized primer number generator to use simpler conversion diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 59e04b3a..67e2ad48 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -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,