- /* Continue with key exchange protocol */
- silc_server_start_key_exchange(server, sconn, sock);
-}
-
-/* Constantly tries to reconnect to a primary router indicated by the
- `ip' and `port'. The `connected' callback will be called when the
- connection is created. */
-
-void silc_server_backup_reconnect(SilcServer server,
- const char *ip, SilcUInt16 port,
- SilcServerConnectRouterCallback callback,
- void *context)
-{
- SilcServerConnection sconn;
-
- SILC_LOG_INFO(("Attempting to reconnect to primary router"));
-
- sconn = silc_calloc(1, sizeof(*sconn));
- sconn->remote_host = strdup(ip);
- sconn->remote_port = port;
- sconn->callback = callback;
- sconn->callback_context = context;
- sconn->no_reconnect = TRUE;
- sconn->retry_count = 0;
- silc_schedule_task_add(server->schedule, 0,
- silc_server_backup_connect_to_router,
- sconn, 1, 0, SILC_TASK_TIMEOUT,
- SILC_TASK_PRI_NORMAL);