From 9f77fa55cd658dc0f2a95921bd96939903c8b577 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 7 Sep 2002 15:22:20 +0000 Subject: [PATCH] Do not save locally resolved hostname for local entry but take what server sends in WHOIS. --- CHANGES | 5 +++++ lib/silcclient/client.c | 2 -- lib/silcclient/idlist.c | 9 +++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index b992c5cd..ec4a2735 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,11 @@ Sat Sep 7 16:02:09 EEST 2002 Pekka Riikonen instead of by default using the Toolkit base version as protocol version. Affected file prepare. + * Do not set the locally resolved hostname for local client + entry but take what server sends. This way the real hostname + is showed in WHOIS for yourself. Affected file is + lib/silcclient/idlist.c and lib/silcclient/client.c. + Sat Sep 7 14:22:43 CEST 2002 Lubomir Sedlacik * Rewritten check for POSIX threads. Use --with-pthreads[=DIR] diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index f44aefbd..5c94551d 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -1618,8 +1618,6 @@ void silc_client_receive_new_id(SilcClient client, conn->local_entry->nickname = conn->nickname; if (!conn->local_entry->username) conn->local_entry->username = strdup(client->username); - if (!conn->local_entry->hostname) - conn->local_entry->hostname = strdup(client->hostname); if (!conn->local_entry->server) conn->local_entry->server = strdup(conn->remote_host); conn->local_entry->id = conn->local_id; diff --git a/lib/silcclient/idlist.c b/lib/silcclient/idlist.c index f20efc26..92b1dc37 100644 --- a/lib/silcclient/idlist.c +++ b/lib/silcclient/idlist.c @@ -646,9 +646,14 @@ void silc_client_update_client(SilcClient client, SILC_LOG_DEBUG(("Start")); - if (!client_entry->username && username) - silc_parse_userfqdn(username, &client_entry->username, + if ((!client_entry->username || !client_entry->hostname) && username) { + silc_free(client_entry->username); + silc_free(client_entry->hostname); + client_entry->username = NULL; + client_entry->hostname = NULL; + silc_parse_userfqdn(username, &client_entry->username, &client_entry->hostname); + } if (!client_entry->realname && userinfo) client_entry->realname = strdup(userinfo); if (!client_entry->nickname && nickname) { -- 2.24.0