on channels.
server = (SilcServerEntry)id_cache->context;
- if (ret_entry)
- *ret_entry = id_cache;
-
if (server && registered &&
!(server->data.status & SILC_IDLIST_STATUS_REGISTERED))
return NULL;
+ if (ret_entry)
+ *ret_entry = id_cache;
+
SILC_LOG_DEBUG(("Found"));
return server;
server = (SilcServerEntry)id_cache->context;
- if (ret_entry)
- *ret_entry = id_cache;
-
if (server && registered &&
!(server->data.status & SILC_IDLIST_STATUS_REGISTERED))
return NULL;
+ if (ret_entry)
+ *ret_entry = id_cache;
+
SILC_LOG_DEBUG(("Found"));
return server;
silc_idcache_list_free(list);
- if (ret_entry)
- *ret_entry = id_cache;
-
if (server && registered &&
!(server->data.status & SILC_IDLIST_STATUS_REGISTERED))
return NULL;
+ if (ret_entry)
+ *ret_entry = id_cache;
+
SILC_LOG_DEBUG(("Found"));
return server;
client = (SilcClientEntry)id_cache->context;
- if (ret_entry)
- *ret_entry = id_cache;
-
if (client && registered &&
!(client->data.status & SILC_IDLIST_STATUS_REGISTERED))
return NULL;
+ if (ret_entry)
+ *ret_entry = id_cache;
+
SILC_LOG_DEBUG(("Found"));
return client;
{
SilcBuffer buffer = packet->buffer, buf;
SilcIDListData idata;
+ SilcIDCacheEntry id_cache = NULL;
SilcClientEntry detached_client;
SilcClientID *client_id = NULL;
unsigned char *id_string, *auth = NULL;
/* Get entry to the client, and resolve it if we don't have it. */
detached_client = silc_idlist_find_client_by_id(server->local_list,
- client_id, TRUE, NULL);
+ client_id, TRUE,
+ &id_cache);
if (!detached_client) {
detached_client = silc_idlist_find_client_by_id(server->global_list,
- client_id, TRUE, NULL);
+ client_id, TRUE,
+ &id_cache);
if (!detached_client) {
SILC_LOG_DEBUG(("Resuming client is unknown"));
silc_free(client_id);
detached_client->mode &= ~SILC_UMODE_DETACHED;
detached_client->data.status |= SILC_IDLIST_STATUS_RESUMED;
detached_client->data.status &= ~SILC_IDLIST_STATUS_LOCAL;
+ id_cache->expire = 0;
/* Update channel information regarding global clients on channel. */
if (server->server_type == SILC_SERVER) {
SilcClientEntry client;
SilcIDCacheEntry cache;
SilcChannelClientEntry chl;
- bool global;
SILC_LOG_DEBUG(("Start"));
continue;
}
- global = FALSE;
+ cache = NULL;
/* Check if we have this client cached already. */
client = silc_idlist_find_client_by_id(server->local_list, client_id,
server->server_type, &cache);
- if (!client) {
+ if (!client)
client = silc_idlist_find_client_by_id(server->global_list,
client_id, server->server_type,
&cache);
- global = TRUE;
- }
if (!client) {
/* If router did not find such Client ID in its lists then this must
be bogus client or some router in the net is buggy. */
}
client->data.status |= SILC_IDLIST_STATUS_REGISTERED;
- } else {
- /* Found, if it is from global list we'll assure that we won't
- expire it now that the entry is on channel. */
- if (global)
- cache->expire = 0;
}
+ if (cache)
+ cache->expire = 0;
silc_free(client_id);
if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED)) {