Completed the backup router support for standalone routers.
[silc.git] / apps / silcd / command_reply.c
index a904d3a579ea5abe6085aed211ef9794735b2ab9..74e3d45e87320f7e8932963e9d474254151131ea 100644 (file)
@@ -566,7 +566,8 @@ silc_server_command_reply_identify_save(SilcServerCommandReplyContext cmd)
       /* We don't have that server anywhere, add it. */
       server_entry = silc_idlist_add_server(server->global_list, 
                                            strdup(name), 0,
-                                           server_id, NULL, NULL);
+                                           server_id, server->router,
+                                           SILC_PRIMARY_ROUTE(server));
       if (!server_entry) {
        silc_free(server_id);
        goto error;
@@ -601,7 +602,7 @@ silc_server_command_reply_identify_save(SilcServerCommandReplyContext cmd)
       if (server->server_type != SILC_SERVER)
        goto error;
       
-      /* We don't have that server anywhere, add it. */
+      /* We don't have that channel anywhere, add it. */
       channel = silc_idlist_add_channel(server->global_list, strdup(name),
                                        SILC_CHANNEL_MODE_NONE, channel_id, 
                                        server->router, NULL, NULL, 0);
@@ -693,7 +694,8 @@ SILC_SERVER_CMD_REPLY_FUNC(info)
       /* Add the server to global list */
       server_id = silc_id_dup(server_id, SILC_ID_SERVER);
       entry = silc_idlist_add_server(server->global_list, name, 0,
-                                    server_id, NULL, NULL);
+                                    server_id, cmd->sock->user_data,
+                                    cmd->sock);
       if (!entry) {
        silc_free(server_id);
        goto out;
@@ -1061,7 +1063,7 @@ SILC_SERVER_CMD_REPLY_FUNC(users)
        goto out;
 
       idp = silc_id_payload_encode(channel_id, SILC_ID_CHANNEL);
-      silc_server_send_command(server, server->router->connection,
+      silc_server_send_command(server, SILC_PRIMARY_ROUTE(server),
                               SILC_COMMAND_IDENTIFY, ++server->cmd_ident,
                               1, 5, idp->data, idp->len);
       silc_buffer_free(idp);