From 43ac60aa4ee4d93aec9f21a771ddd7a860d6ebe7 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 7 Sep 2002 17:02:40 +0000 Subject: [PATCH] Resolved local info with IDENTIFY in connecting. --- CHANGES | 2 ++ lib/silcclient/client.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ec4a2735..7f37de79 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,8 @@ Sat Sep 7 16:02:09 EEST 2002 Pekka Riikonen is showed in WHOIS for yourself. Affected file is lib/silcclient/idlist.c and lib/silcclient/client.c. + * Resolve local info with IDENTIFY when connecting to server.y + 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 5c94551d..b3835a15 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -1633,9 +1633,19 @@ void silc_client_receive_new_id(SilcClient client, (void *)conn->local_entry, 0, NULL); if (connecting) { - if (!conn->params.detach_data) { - SilcBuffer sidp; + SilcBuffer sidp; + /* Issue IDENTIFY command for itself to get resolved hostname + correctly from server. */ + silc_client_command_register(client, SILC_COMMAND_IDENTIFY, NULL, NULL, + silc_client_command_reply_identify_i, 0, + ++conn->cmd_ident); + sidp = silc_id_payload_encode(conn->local_entry->id, SILC_ID_CLIENT); + silc_client_command_send(client, conn, SILC_COMMAND_IDENTIFY, + conn->cmd_ident, 1, 5, sidp->data, sidp->len); + silc_buffer_free(sidp); + + if (!conn->params.detach_data) { /* Send NICK command if the nickname was set by the application (and is not same as the username). Send this with little timeout. */ if (client->nickname && strcmp(client->nickname, client->username)) -- 2.24.0