X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand_reply.c;h=97aedf0e8e37455267c4818136418a9c24510b9f;hp=e6858ae43e0fca5192173ab51f14ecf23803a750;hb=52e57c880aba9c5e89f59d962eb9af75670b76e0;hpb=ae1482a76c29db9fdcd6ed6cf63d312a37a5cb01 diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index e6858ae4..97aedf0e 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -261,9 +261,10 @@ silc_server_command_reply_whois_save(SilcServerCommandReplyContext cmd) return FALSE; } - /* Remove the old cache entry */ - silc_idcache_del_by_context(global ? server->global_list->clients : - server->local_list->clients, client, NULL); + /* Update entry */ + silc_idcache_update_by_context(global ? server->global_list->clients : + server->local_list->clients, client, NULL, + nickname, TRUE); silc_free(client->nickname); silc_free(client->username); @@ -277,11 +278,6 @@ silc_server_command_reply_whois_save(SilcServerCommandReplyContext cmd) client->mode = mode; client->data.status |= SILC_IDLIST_STATUS_RESOLVED; client->data.status &= ~SILC_IDLIST_STATUS_RESOLVING; - - /* Create new cache entry */ - silc_idcache_add(global ? server->global_list->clients : - server->local_list->clients, nickname, client->id, - client); } /* Save channel list if it was sent to us */ @@ -1203,7 +1199,8 @@ SILC_SERVER_CMD_REPLY_FUNC(join) silc_hmac_free(hmac); silc_server_command_reply_free(cmd); - silc_pkcs_public_key_free(founder_key); + if (founder_key) + silc_pkcs_public_key_free(founder_key); if (client_id_list) silc_buffer_free(client_id_list); if (client_mode_list)