From: Pekka Riikonen Date: Thu, 29 Mar 2001 16:31:03 +0000 (+0000) Subject: updates. X-Git-Tag: SILC.0.1~76 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=3541e4cdd5c82b472614aea6753db0319df7564c;p=silc.git updates. --- diff --git a/CHANGES b/CHANGES index 87385275..83f0304c 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,9 @@ Thu Mar 29 19:10:28 EEST 2001 Pekka Riikonen crashed since it did not handle the fact that there is no cipher called "3" and didn't check the error condition. Now fixed. + * Added SILC_MESSAGE_FLAG_REQUEST message flag as generic request + flag. It can be used to send message requests. + Thu Mar 29 12:26:25 EEST 2001 Pekka Riikonen * Implemented the RESTART command in the client. diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 0f712ea0..ec42a1f6 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -2947,6 +2947,12 @@ SILC_SERVER_CMD_FUNC(join) if (server->standalone) { channel = silc_server_create_new_channel(server, server->id, cipher, hmac, channel_name, TRUE); + if (!channel) { + silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, + SILC_STATUS_ERR_UNKNOWN_ALGORITHM); + goto out; + } + umode = (SILC_CHANNEL_UMODE_CHANOP | SILC_CHANNEL_UMODE_CHANFO); created = TRUE; @@ -2988,6 +2994,12 @@ SILC_SERVER_CMD_FUNC(join) /* Channel really does not exist, create it */ channel = silc_server_create_new_channel(server, server->id, cipher, hmac, channel_name, TRUE); + if (!channel) { + silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, + SILC_STATUS_ERR_UNKNOWN_ALGORITHM); + goto out; + } + umode = (SILC_CHANNEL_UMODE_CHANOP | SILC_CHANNEL_UMODE_CHANFO); created = TRUE; } @@ -3012,6 +3024,12 @@ SILC_SERVER_CMD_FUNC(join) /* Channel really does not exist, create it */ channel = silc_server_create_new_channel(server, server->id, cipher, hmac, channel_name, TRUE); + if (!channel) { + silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, + SILC_STATUS_ERR_UNKNOWN_ALGORITHM); + goto out; + } + umode = (SILC_CHANNEL_UMODE_CHANOP | SILC_CHANNEL_UMODE_CHANFO); created = TRUE; } diff --git a/doc/draft-riikonen-silc-pp-01.nroff b/doc/draft-riikonen-silc-pp-01.nroff index b289427d..2920bd8c 100644 --- a/doc/draft-riikonen-silc-pp-01.nroff +++ b/doc/draft-riikonen-silc-pp-01.nroff @@ -1493,7 +1493,12 @@ o Flags (2 bytes) - Includes the flags of the channel The message is for example and informational notice type message. - 0x0010 - 0x0200 RESERVED + 0x0010 SILC_MESSAGE_FLAG_REQUEST + + This is a generic request flag to send request + messages. + + 0x0020 - 0x0200 RESERVED Reserved for future flags diff --git a/lib/silccore/silcchannel.h b/lib/silccore/silcchannel.h index 53b24990..813ad694 100644 --- a/lib/silccore/silcchannel.h +++ b/lib/silccore/silcchannel.h @@ -44,7 +44,8 @@ typedef unsigned short SilcMessageFlags; #define SILC_MESSAGE_FLAG_NOREPLY 0x0002 #define SILC_MESSAGE_FLAG_ACTION 0x0004 #define SILC_MESSAGE_FLAG_NOTICE 0x0008 -#define SILC_MESSAGE_FLAG_RESERVED 0x0010 /* to 0x0200 */ +#define SILC_MESSAGE_FLAG_REQUEST 0x0010 +#define SILC_MESSAGE_FLAG_RESERVED 0x0020 /* to 0x0200 */ #define SILC_MESSAGE_FLAG_PRIVATE 0x0400 /* to 0x8000 */ /* Prototypes */