From: Pekka Riikonen Date: Wed, 8 Oct 2003 16:42:28 +0000 (+0000) Subject: ERR_BAD_PASSWORD returns now Channel ID. X-Git-Tag: silc.client.0.9.13~16 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=7c2526e107e19c31fe8c36a71fa1d9f57e2759a8 ERR_BAD_PASSWORD returns now Channel ID. --- diff --git a/CHANGES b/CHANGES index ac13f727..f967987e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,14 @@ +Wed Oct 8 19:41:15 EEST 2003 Pekka Riikonen + + * 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 * 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 diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 0f93b922..c207bac9 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -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; } } diff --git a/doc/draft-riikonen-silc-commands-06.nroff b/doc/draft-riikonen-silc-commands-06.nroff index 50d151fd..84e91979 100644 --- a/doc/draft-riikonen-silc-commands-06.nroff +++ b/doc/draft-riikonen-silc-commands-06.nroff @@ -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 diff --git a/lib/doc/LIBINDEX b/lib/doc/LIBINDEX index b10c4bb5..2d15f871 100644 --- a/lib/doc/LIBINDEX +++ b/lib/doc/LIBINDEX @@ -7,7 +7,7 @@
Version: @VERSION@
-Copyright © 2001 - 2002 The SILC Project
+Copyright © 1997 - 2003 The SILC Project
Updated: @DATE@



diff --git a/lib/doc/silcstatus_args.html b/lib/doc/silcstatus_args.html index 20be886a..ca727cbd 100644 --- a/lib/doc/silcstatus_args.html +++ b/lib/doc/silcstatus_args.html @@ -1,7 +1,7 @@ SilcStatus Arguments
 
-The SilcStatus is used to indicate +The SilcStatus 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. SILC_STATUS_ERR_BAD_PASSWORD -Password provided for channel were not accepted. No arguments returned. +Password provided for channel were not accepted. Returns the channel ID. -N/A +const SilcChannelID *channel_id