updates.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 9 Feb 2002 12:50:01 +0000 (12:50 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 9 Feb 2002 12:50:01 +0000 (12:50 +0000)
CHANGES
apps/irssi/src/silc/core/client_ops.c
lib/silcclient/client_ops_example.c
lib/silcclient/silcapi.h
lib/silccore/silcchannel.c

diff --git a/CHANGES b/CHANGES
index f97dccba3a059fe719e40ea864b0d133ed9b2c94..ccde29976d2a194f7f74db748f7943b6feda416a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Sat Feb  9 14:54:33 EET 2002  Pekka Riikonen <priikone@silcnet.org>
+
+       * Allow zero length channel messages inside the Channel Message
+         Payload.  Affected file lib/silccore/silcchannel.c.
+
 Thu Feb  7 10:12:25 CET 2002  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed CUMODE_CHANGE notify handling to change the mode of
index 64cdf7e8be811707ca0c2c8c7cb6bd9f9c75233e..6d451459af572596f2dba76485f7bac4d04a888f 100644 (file)
@@ -87,6 +87,9 @@ void silc_channel_message(SilcClient client, SilcClientConnection conn,
   
   SILC_LOG_DEBUG(("Start"));
 
+  if (!msg)
+    return;
+
   server = conn == NULL ? NULL : conn->context;
   chanrec = silc_channel_find_entry(server, channel);
   if (!chanrec)
index 87765460615274980ce662c224ddf1b7d7f0523c..d472a0571a770e9dc22485237969863d651c4067 100644 (file)
@@ -22,8 +22,9 @@ silc_say(SilcClient client, SilcClientConnection conn,
 }
 
 
-/* Message for a channel. The `sender' is the sender of the message 
-   The `channel' is the channel. */
+/* Message for a channel. The `sender' is the sender of the message
+   The `channel' is the channel. The `msg' is the message.  Note that  
+   `msg' maybe NULL. */
 
 static void 
 silc_channel_message(SilcClient client, SilcClientConnection conn, 
index 1cb8801c9e0776cd3a10acb1c80f722c6d44e6f8..0d6244b229f2a5a60d7272d58cbad8a53d512f0d 100644 (file)
@@ -239,7 +239,8 @@ typedef struct {
              SilcClientMessageType type, char *msg, ...);
 
   /* Message for a channel. The `sender' is the sender of the message 
-     The `channel' is the channel. */
+     The `channel' is the channel. The `msg' is the message.  Note that
+     `msg' maybe NULL. */
   void (*channel_message)(SilcClient client, SilcClientConnection conn, 
                          SilcClientEntry sender, SilcChannelEntry channel, 
                          SilcMessageFlags flags, char *msg);
@@ -1195,6 +1196,7 @@ SilcClientCommandContext silc_client_command_dup(SilcClientCommandContext ctx);
  *
  *    Finds and returns a pointer to the command list. Return NULL if the
  *    command is not found. See the `command.[ch]' for the command list. 
+ *    Command names are not case-sensitive.
  *
  ***/
 SilcClientCommand silc_client_command_find(SilcClient client,
index 6bab3c22b87409b81408c9943c6c96e5f206faec..fef7a197cd482787af40d732e44fa6e53cc1c35d 100644 (file)
@@ -335,7 +335,7 @@ silc_channel_message_payload_parse(unsigned char *payload,
   if (ret == -1)
     goto err;
 
-  if (new->data_len < 1 || new->data_len > buffer.len) {
+  if (new->data_len > buffer.len) {
     SILC_LOG_ERROR(("Incorrect channel message payload in packet, "
                    "packet dropped"));
     goto err;