More log printing to backup router protocol.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 6 Dec 2002 15:45:03 +0000 (15:45 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 6 Dec 2002 15:45:03 +0000 (15:45 +0000)
apps/silcd/command.c
apps/silcd/server_backup.c

index 01c85819a9d97db24209cb97400c511c3b4b3926..78beef6f58c38c90c71ae045894c8c16000351e1 100644 (file)
@@ -3082,7 +3082,6 @@ SILC_SERVER_CMD_FUNC(cumode)
   SilcServerCommandContext cmd = (SilcServerCommandContext)context;
   SilcServer server = cmd->server;
   SilcClientEntry client = (SilcClientEntry)cmd->sock->user_data;
-  SilcIDListData idata = (SilcIDListData)client;
   SilcChannelID *channel_id = NULL;
   SilcClientID *client_id = NULL;
   SilcChannelEntry channel;
index a6cfffb65d4ee3c981a64abe89b58a0f193549ef..b1e615093c85aa01bd6cb928b0bb24303f15527e 100644 (file)
@@ -792,7 +792,9 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup)
            ctx->sessions[ctx->sessions_count].connected = FALSE;
            ctx->sessions[ctx->sessions_count].server_entry = server_entry;
 
-           SILC_LOG_DEBUG(("Sending START to %s (session %d)", 
+           SILC_LOG_DEBUG(("Sending START to %s (session %d)",
+                           server_entry->server_name, ctx->sessions_count));
+           SILC_LOG_INFO(("Expecting CONNECTED from %s (session %d)",
                            server_entry->server_name, ctx->sessions_count));
 
            /* This connection is performing this protocol too now */
@@ -839,6 +841,8 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup)
 
            SILC_LOG_DEBUG(("Sending START to %s (session %d)", 
                            server_entry->server_name, ctx->sessions_count));
+           SILC_LOG_INFO(("Expecting CONNECTED from %s (session %d)",
+                           server_entry->server_name, ctx->sessions_count));
 
            /* This connection is performing this protocol too now */
            ((SilcSocketConnection)server_entry->connection)->protocol =
@@ -940,11 +944,13 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup)
        break;
       }
 
-      SILC_LOG_DEBUG(("Received CONNECTED (session %d)", ctx->session));
-
       for (i = 0; i < ctx->sessions_count; i++) {
        if (ctx->sessions[i].session == ctx->session) {
          ctx->sessions[i].connected = TRUE;
+         SILC_LOG_INFO(("Received CONNECTED from %s (session %d)",
+                        ctx->sessions[i].server_entry->server_name,
+                        ctx->session));
+         SILC_LOG_DEBUG(("Received CONNECTED (session %d)", ctx->session));
          break;
        }
       }
@@ -954,7 +960,8 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup)
          return;
       }
 
-      SILC_LOG_DEBUG(("All sessions has returned CONNECTED packets"));
+      SILC_LOG_INFO(("All sessions have returned CONNECTED packets, "
+                    "continuing"));
       SILC_LOG_DEBUG(("Sending ENDING packet to primary router"));
 
       /* Send with a timeout */
@@ -1101,7 +1108,7 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup)
        break;
       }
 
-      SILC_LOG_DEBUG(("Received RESUMED from new primary router"));
+      SILC_LOG_INFO(("Received RESUMED from new primary router"));
 
       if (server->backup_router)
        server->server_type = SILC_BACKUP_ROUTER;
@@ -1241,7 +1248,7 @@ SILC_TASK_CALLBACK(silc_server_protocol_backup_done)
     silc_idcache_list_free(list);
   }
 
-  SILC_LOG_DEBUG(("Backup resuming protocol has ended"));
+  SILC_LOG_INFO(("Backup resuming protocol ended successfully"));
 
   if (ctx->sock->protocol)
     ctx->sock->protocol = NULL;