From: Pekka Riikonen Date: Mon, 4 Jun 2001 14:55:20 +0000 (+0000) Subject: updates. X-Git-Tag: 1.2.beta1~2212 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=44cc109b5932ed1c84539f2da0b86392539d2b55;p=crypto.git updates. --- diff --git a/CHANGES b/CHANGES index b92a6bea..2d3e39bc 100644 --- a/CHANGES +++ b/CHANGES @@ -9,7 +9,10 @@ Mon Jun 4 17:57:16 CEST 2001 Pekka Riikonen * Resolve the client in USERS command reply if the entry does not have username resolved. The affected file is - lib/silcclient/command_reply.c. + lib/silcclient/command_reply.c. Also, changed the IDENTIFY + command to WHOIS command to really resolve stuff. The USERS + is not used any more in any critical section so WHOIS can + be used even though it might be slower than IDENTIFY. Sun Jun 3 14:21:32 EEST 2001 Pekka Riikonen diff --git a/apps/silcd/packet_receive.c b/apps/silcd/packet_receive.c index fe420c61..5a378df8 100644 --- a/apps/silcd/packet_receive.c +++ b/apps/silcd/packet_receive.c @@ -278,6 +278,9 @@ void silc_server_notify(SilcServer server, client->data.registered = FALSE; cache->expire = SILC_ID_CACHE_EXPIRE_DEF; + server->stat.clients--; + if (server->server_type == SILC_ROUTER) + server->stat.cell_clients--; break; case SILC_NOTIFY_TYPE_TOPIC_SET: diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index 676e9a25..17d0b330 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -1635,13 +1635,17 @@ SILC_CLIENT_CMD_REPLY_FUNC(users) SILC_GET32_MSB(mode, client_mode_list->data); /* Check if we have this client cached already. */ - if (!silc_idcache_find_by_id_one_ext(conn->client_cache, - (void *)client_id, - NULL, NULL, - silc_hash_client_id_compare, NULL, - &id_cache)) { - /* No we don't have it, query it from the server. Assemble argument - table that will be sent fr the IDENTIFY command later. */ + 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); + + if (!id_cache || !((SilcClientEntry)id_cache->context)->username) { + /* No we don't have it (or it is incomplete in information), query + it from the server. Assemble argument table that will be sent + for the IDENTIFY command later. */ res_argv = silc_realloc(res_argv, sizeof(*res_argv) * (res_argc + 1)); res_argv_lens = silc_realloc(res_argv_lens, sizeof(*res_argv_lens) *