Fixed channel pk list saving on JOIN command reply on backup router.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 9 May 2005 09:59:49 +0000 (09:59 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 9 May 2005 09:59:49 +0000 (09:59 +0000)
CHANGES
apps/silcd/command_reply.c
apps/silcd/packet_receive.c
apps/silcd/server_util.c

diff --git a/CHANGES b/CHANGES
index 0279f209b29fd91542ef1b286e9d1f348ec64d53..3bc0fa283473fcfc01a6895d696928b037382031 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Mon May  9 12:00:08 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
+
+       * Fixed channel public key list saving on JOIN command reply
+         on backup router.  Affected file apps/silcd/command_reply.c.
+
 Mon May  2 10:42:49 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
 
        * Added default limit how many channels client can join,
index 198b7167ef56e7c994c10b8c0a274ed0ab6c5083..506c7f1e79b7094791a0a9e17c834b2bdecf159e 100644 (file)
@@ -1219,7 +1219,7 @@ SILC_SERVER_CMD_REPLY_FUNC(join)
 
   /* Get channel public key list */
   tmp = silc_argument_get_arg_type(cmd->args, 16, &len);
-  if (tmp && server->server_type == SILC_SERVER)
+  if (tmp && server->server_type != SILC_ROUTER)
     silc_server_set_channel_pk_list(server, NULL, entry, tmp, len);
 
   /* The the user limit */
index fa24ff21e4f1af12ef652e0c7d49d049c7d51a82..86c17cc2a10dc5ca8511d5582a74183cdcf88e5d 100644 (file)
@@ -613,7 +613,7 @@ void silc_server_notify(SilcServer server,
       /* If we received same mode from our primary check whether founder
         mode and key in the notify is set.  We update the founder key
         here since we may have wrong one */
-      if (server->server_type == SILC_SERVER &&
+      if (server->server_type != SILC_ROUTER &&
          sock == SILC_PRIMARY_ROUTE(server) &&
          mode & SILC_CHANNEL_MODE_FOUNDER_AUTH) {
        SILC_LOG_DEBUG(("Founder public key received from router"));
@@ -811,7 +811,10 @@ void silc_server_notify(SilcServer server,
     /* Process channel public key(s). */
     tmp = silc_argument_get_arg_type(args, 7, &tmp_len);
     if (tmp && mode & SILC_CHANNEL_MODE_CHANNEL_AUTH) {
-      SilcStatus ret =
+      SilcStatus ret;
+      SILC_LOG_DEBUG(("Channel public key list received from router"));
+
+      ret =
        silc_server_set_channel_pk_list(server, sock, channel, tmp, tmp_len);
 
       /* If list was set already we will enforce the same list to server. */
index 162cb06b7c6fd444ef2f696e939ca238d8fb76f7..05197afcf13eeed65a0a360372def2b7bdfbc8c4 100644 (file)
@@ -1893,7 +1893,7 @@ bool silc_server_inviteban_process(SilcServer server, SilcHashTable list,
     tmp = silc_argument_get_first_arg(args, &type, &len);
     while (tmp) {
       if (type == 1) {
-       /* Check validity of the string.  Actually we should parse the 
+       /* Check validity of the string.  Actually we should parse the
           whole string and verify all components individually. */
        if (!silc_utf8_valid(tmp, len) || !len) {
          tmp = silc_argument_get_next_arg(args, &type, &len);
@@ -1983,7 +1983,7 @@ bool silc_server_inviteban_process(SilcServer server, SilcHashTable list,
     tmp = silc_argument_get_first_arg(args, &type, &len);
     while (tmp) {
       if (type == 1) {
-       /* Check validity of the string.  Actually we should parse the 
+       /* Check validity of the string.  Actually we should parse the
           whole string and verify all components individually. */
        if (!silc_utf8_valid(tmp, len)) {
          tmp = silc_argument_get_next_arg(args, &type, &len);
@@ -2107,8 +2107,8 @@ silc_server_process_channel_pk(SilcServer server,
 
   if (type == 0x00) {
     /* Add new public key to channel public key list */
-    SILC_LOG_DEBUG(("Add new channel public key to channel %s",
-                   channel->channel_name));
+    SILC_LOG_DEBUG(("Add new channel public key %s to channel %s",
+                   chpk->identifier, channel->channel_name));
 
     /* Check for resource limit */
     if (silc_hash_table_count(channel->channel_pubkeys) > 64) {