void silc_server_stop(SilcServer server)
{
- SILC_LOG_DEBUG(("Stopping server"));
+ SILC_LOG_INFO(("SILC Server shutting down"));
if (server->schedule) {
int i;
if (!sconn->backup) {
/* Mark this router our primary router if we're still standalone */
if (server->standalone) {
+ SILC_LOG_DEBUG(("This connection is our primary router"));
server->id_entry->router = id_entry;
server->router = id_entry;
server->standalone = FALSE;
if (conn->param) {
if (conn->param->keepalive_secs)
hearbeat_timeout = conn->param->keepalive_secs;
+
+ /* Check if to be anonymous connection */
+ if (conn->param->anonymous)
+ client->mode |= SILC_UMODE_ANONYMOUS;
}
id_entry = (void *)client;
silc_server_remove_servers_by_server(server, user_data, TRUE);
/* Remove the clients that this server owns as they will become
- invalid now too. */
- silc_server_remove_clients_by_server(server, user_data,
- user_data, TRUE);
+ invalid now too. For backup router the server is actually
+ coming from the primary router, so mark that as the owner
+ of this entry. */
+ if (server->server_type == SILC_BACKUP_ROUTER &&
+ sock->type == SILC_SOCKET_TYPE_SERVER)
+ silc_server_remove_clients_by_server(server, server->router,
+ user_data, TRUE);
+ else
+ silc_server_remove_clients_by_server(server, user_data,
+ user_data, TRUE);
/* Remove channels owned by this server */
if (server->server_type == SILC_SERVER)
SilcIDCacheEntry cache;
SilcChannelClientEntry chl;
- SILC_LOG_DEBUG(("Start"));
+ SILC_LOG_DEBUG(("Saving %d users on %s channel", user_count,
+ channel->channel_name));
for (i = 0; i < user_count; i++) {
/* Client ID */