X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserver.c;h=4b58bda6bd8980411ede2a44f413020f4a6b6baa;hb=26516272f6e9e47c6472efa50493a6a1044c02ac;hp=05323399eda32a43a8612d13898fbf6f42f15bef;hpb=33b943ac6034b92fcc5c09802f9fe9add12a51c9;p=silc.git diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 05323399..4b58bda6 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -1319,7 +1319,9 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection_final) ctx->conn_type == SILC_SOCKET_TYPE_SERVER ? SILC_SERVER : SILC_ROUTER, NULL, ctx->conn_type == SILC_SOCKET_TYPE_SERVER ? - server->id_entry : NULL, sock); + server->id_entry : + (conn->backup_router ? server->id_entry : + NULL), sock); if (!new_server) { SILC_LOG_ERROR(("Could not add new server to cache")); silc_free(sock->user_data); @@ -1351,14 +1353,6 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection_final) } } -#if 0 - /* If the incoming connection is normal server and marked as backup - server then it will use us as backup router. We'll disable the - connection until it is allowed to be used. */ - if (ctx->conn_type == SILC_SOCKET_TYPE_SERVER && conn->backup_router) - SILC_SET_DISABLED(sock); -#endif - /* Check whether this connection is to be our primary router connection if we do not already have the primary route. */ if (server->standalone && ctx->conn_type == SILC_SOCKET_TYPE_ROUTER) { @@ -2381,16 +2375,6 @@ void silc_server_free_sock_user_data(SilcServer server, if (backup_router) { /* Announce all of our stuff that was created about 5 minutes ago. The backup router knows all the other stuff already. */ - if (server->server_type == SILC_ROUTER) - silc_server_announce_servers(server, FALSE, 0, - server->router->connection); - - /* Announce our clients and channels to the router */ - silc_server_announce_clients(server, 0, - server->router->connection); - silc_server_announce_channels(server, 0, - server->router->connection); -#if 0 if (server->server_type == SILC_ROUTER) silc_server_announce_servers(server, FALSE, time(0) - 300, server->router->connection); @@ -2400,7 +2384,6 @@ void silc_server_free_sock_user_data(SilcServer server, server->router->connection); silc_server_announce_channels(server, time(0) - 300, server->router->connection); -#endif } break; }