From: Pekka Riikonen Date: Sat, 17 Feb 2001 20:06:31 +0000 (+0000) Subject: update. X-Git-Tag: SILC.0.1~213 X-Git-Url: http://git.silc.fi/gitweb/?a=commitdiff_plain;h=39e8187add9bc483226d8ed6b762ca6e5d10aba2;p=silc.git update. --- diff --git a/CHANGES b/CHANGES index 66680e19..f4e6ed1b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +Sat Feb 17 22:11:50 EET 2001 Pekka Riikonen + + * Moved the calling of ops->connect() from connect_to_server_final + into receive_new_id functin since that is the point when the + client is actually allowed to send traffic to network. The + affected file is lib/silcclient/client.c. + Sat Feb 17 13:15:35 EET 2001 Pekka Riikonen * When receiving NEW_CHANNEL_LIST, NEW_CHANNEL_USER_LIST, diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index c19f206e..bfb38375 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -496,9 +496,6 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_final) conn->remote_id_data = silc_id_id2str(ctx->dest_id, SILC_ID_SERVER); conn->remote_id_data_len = SILC_ID_SERVER_LEN; - /* Notify application of successful connection */ - client->ops->connect(client, conn, TRUE); - silc_protocol_free(protocol); if (ctx->auth_data) silc_free(ctx->auth_data); @@ -1867,6 +1864,10 @@ void silc_client_receive_new_id(SilcClient client, /* Put it to the ID cache */ silc_idcache_add(conn->client_cache, conn->nickname, SILC_ID_CLIENT, conn->local_id, (void *)conn->local_entry, TRUE); + + /* Notify application of successful connection. We do it here now that + we've received the Client ID and are allowed to send traffic. */ + client->ops->connect(client, conn, TRUE); } /* Processed received Channel ID for a channel. This is called when client