`from' and which are originated from a server that we have connection
to, when we've acting as backup router. If it is FALSE the `to' will
be the new source. This function also removes the clients that are
- *really* originated from `from'. These are clients that the `from'
- owns, and not just clients that are behind the `from'. */
+ *really* originated from `from' if `remove_from' is TRUE. These are
+ clients that the `from' owns, and not just clients that are behind
+ the `from'. */
void silc_server_update_clients_by_server(SilcServer server,
SilcServerEntry from,
SilcServerEntry to,
- bool resolve_real_server)
+ bool resolve_real_server,
+ bool remove_from)
{
SilcIDCacheList list = NULL;
SilcIDCacheEntry id_cache = NULL;
/* Skip clients that are *really* owned by the `from' */
if (SILC_ID_COMPARE(from->id, client->id,
client->id->ip.data_len)) {
- SILC_LOG_DEBUG(("Found really owned client, will remove it"));
+ SILC_LOG_DEBUG(("Found really owned client, skip it"));
if (!silc_idcache_list_next(list, &id_cache))
break;
else
/* Skip clients that are *really* owned by the `from' */
if (SILC_ID_COMPARE(from->id, client->id,
client->id->ip.data_len)) {
- SILC_LOG_DEBUG(("Found really owned client, will remove it"));
+ SILC_LOG_DEBUG(("Found really owned client, skip it"));
if (!silc_idcache_list_next(list, &id_cache))
break;
else
silc_idcache_list_free(list);
}
- /* Now remove the clients that are still marked as orignated from the
- `from'. These are the clients that really was owned by the `from' and
- not just exist behind the `from'. */
- silc_server_remove_clients_by_server(server, from, TRUE);
+ if (remove_from)
+ /* Now remove the clients that are still marked as orignated from the
+ `from'. These are the clients that really was owned by the `from' and
+ not just exist behind the `from'. */
+ silc_server_remove_clients_by_server(server, from, TRUE);
}
/* Checks whether given channel has global users. If it does this returns