/* As router we must deliver this packet directly to the original
server whom this client was earlier. */
- if (server->server_type == SILC_ROUTER && detached_client->router)
+ if (server->server_type == SILC_ROUTER && detached_client->router &&
+ detached_client->router->server_type != SILC_ROUTER)
silc_server_packet_send(server, detached_client->router->connection,
SILC_PACKET_RESUME_CLIENT, 0,
buf->data, buf->len, TRUE);
}
silc_hash_table_list_reset(&htl);
- SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
- ("Your session is successfully resumed"));
-
} else if (sock->type != SILC_SOCKET_TYPE_CLIENT) {
/* Server or router sent this to us to notify that that a client has
been resumed. */
}
}
+ if (server->server_type == SILC_ROUTER &&
+ sock->type == SILC_SOCKET_TYPE_ROUTER &&
+ server_entry->server_type == SILC_ROUTER)
+ local = FALSE;
+
SILC_LOG_DEBUG(("Resuming detached client"));
/* Change the client to correct list. */