X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fidlist.c;fp=lib%2Fsilcclient%2Fidlist.c;h=9f21b8a5fd06908b6ba18d4d8e021998fdaf6412;hb=275e2f50c1cbe4a0eec582cf490ef485049541af;hp=7549a62ddfb12826517b00548674820306533f36;hpb=7039cf461d3d2951acc2f3e123ccc1d68a55931d;p=silc.git diff --git a/lib/silcclient/idlist.c b/lib/silcclient/idlist.c index 7549a62d..9f21b8a5 100644 --- a/lib/silcclient/idlist.c +++ b/lib/silcclient/idlist.c @@ -377,6 +377,7 @@ void silc_client_get_clients_by_list(SilcClient client, SilcUInt16 idp_len; SilcClientID *client_id; SilcClientEntry entry; + bool ret; /* Get Client ID */ SILC_GET16_MSB(idp_len, client_id_list->data + 2); @@ -388,16 +389,16 @@ void silc_client_get_clients_by_list(SilcClient client, } /* Check if we have this client cached already. */ - id_cache = NULL; - silc_idcache_find_by_id_one_ext(conn->client_cache, (void *)client_id, - NULL, NULL, - silc_hash_client_id_compare, NULL, - &id_cache); + ret = + silc_idcache_find_by_id_one_ext(conn->client_cache, (void *)client_id, + NULL, NULL, + silc_hash_client_id_compare, NULL, + &id_cache); /* If we don't have the entry or it has incomplete info, then resolve it from the server. */ - entry = id_cache ? (SilcClientEntry)id_cache->context : NULL; - if (!id_cache || !entry->nickname) { + if (!ret || !((SilcClientEntry)id_cache->context)->nickname) { + entry = ret ? (SilcClientEntry)id_cache->context : NULL; if (entry) { if (entry->status & SILC_CLIENT_STATUS_RESOLVING) {