ERR_BAD_PASSWORD returns now Channel ID.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 8 Oct 2003 16:42:28 +0000 (16:42 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 8 Oct 2003 16:42:28 +0000 (16:42 +0000)
CHANGES
apps/silcd/command.c
doc/draft-riikonen-silc-commands-06.nroff
lib/doc/LIBINDEX
lib/doc/silcstatus_args.html

diff --git a/CHANGES b/CHANGES
index ac13f727704c66ef7334205800857428355f0bfd..f967987e03735568ac7dab8209de906b6079ed48 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,14 @@
+Wed Oct  8 19:41:15 EEST 2003  Pekka Riikonen <priikone@silcnet.org>
+
+       * ERR_BAD_PASSWORD now returns the Channel ID of the channel
+         where the passphrase was given.  Affected file is
+         silcd/command.c.
+
 Wed Oct  8 09:32:12 CEST 2003  Pekka Riikonen <priikone@silcnet.org>
 
        * INVITE and BAN notifys are now delivered from routers to
          servers (but not clients) on the channel.  Updated specs and
-         code.  Affected files silcd/packet_[send|receive].[ch], 
+         code.  Affected files silcd/packet_[send|receive].[ch],
          command.c, server.c and server_util.c.
 
        * Implemented INVITE and BAN announcing.  Affected files are
index 0f93b9223963fe465062ece060fd79c8bb4f23ad..c207bac9970d00655d820bd55832d67c0fdbdb34 100644 (file)
@@ -2043,8 +2043,11 @@ static void silc_server_command_join_channel(SilcServer server,
 
     if (!passphrase || !channel->passphrase ||
         memcmp(passphrase, channel->passphrase, strlen(channel->passphrase))) {
-      silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN,
-                                           SILC_STATUS_ERR_BAD_PASSWORD, 0);
+      chidp = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL);
+      silc_server_command_send_status_data(cmd, SILC_COMMAND_JOIN,
+                                          SILC_STATUS_ERR_BAD_PASSWORD, 0,
+                                          2, chidp->data, chidp->len);
+      silc_buffer_free(chidp);
       goto out;
     }
   }
index 50d151fdbf8a06263c7f5fa5ecd4bc44e4b16ce5..84e9197907b67b09a82afea17526405f7c5b6c4b 100644 (file)
@@ -2316,7 +2316,8 @@ List of all defined status types:
    33   SILC_STATUS_ERR_BAD_PASSWORD
 
         "Cannot join channel. Incorrect password".  Password provided for
-        channel were not accepted.
+        channel were not accepted.  The next argument MUST be the
+        Channel ID.
 
    34   SILC_STATUS_ERR_CHANNEL_IS_FULL
 
index b10c4bb5ef7ce72d3ce9540c860fa004d7a84c3e..2d15f87181b300875745641ebf8a6f3d92e3edb8 100644 (file)
@@ -7,7 +7,7 @@
 <br />
 <small>
 Version: @VERSION@<br />
-Copyright &copy; 2001 - 2002 The SILC Project<br />
+Copyright &copy; 1997 - 2003 The SILC Project<br />
 Updated: @DATE@
 </small>
 <br /><br /><br />
index 20be886a0ee2015d78e11acedd487d96c74b1187..ca727cbdddf478b85f13ffaae07f752c2350c667 100644 (file)
@@ -1,7 +1,7 @@
 <big><b>SilcStatus Arguments</b></big>
 
 <br />&nbsp;<br />
-The <a href="silccore-SilcStatus.html">SilcStatus</a> is used to indicate
+The <a href="silcstatus-SilcStatus.html">SilcStatus</a> is used to indicate
 a status (usually error status) of command execution and command reply
 status.  It is also used to deliver disconnection status when server
 disconnects client from the server.  For application it is mainly important
@@ -300,9 +300,9 @@ No arguments returned.
 <tr>
 <td><small>SILC_STATUS_ERR_BAD_PASSWORD</td>
 <td><small>
-Password provided for channel were not accepted.  No arguments returned.
+Password provided for channel were not accepted.  Returns the channel ID.
 </td>
-<td width="40%"><small>N/A
+<td width="40%"><small>const SilcChannelID *channel_id
 </td>
 </tr>