X-Git-Url: http://git.silcnet.org/gitweb/?p=crypto.git;a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand_reply.c;h=cf2743af130c4a44ccbb5c8310213a831a0c4e4d;hp=ee71a4264b0c6fa3d7f107fd98fc2a72661bfa02;hb=79284c6f2e3df2de326793b1f9ff038ad88f9e0f;hpb=4d3f87f2f076bd332fa73f878fe198b7a94671b5 diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index ee71a426..cf2743af 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -1138,7 +1138,7 @@ silc_client_command_reply_join_resolved(SilcClient client, channel->internal.resolve_cmd_ident = 0; silc_client_unref_channel(client, conn, channel); - SILC_FSM_CALL_CONTINUE(&cmd->thread); + SILC_FSM_CALL_CONTINUE_SYNC(&cmd->thread); } @@ -1287,8 +1287,13 @@ SILC_FSM_STATE(silc_client_command_reply_join) /* Get channel key and save it */ tmp = silc_argument_get_arg_type(args, 7, &len); if (tmp) { - silc_buffer_set(&keyp, tmp, len); - silc_client_save_channel_key(client, conn, &keyp, channel); + /* If channel key already exists on the channel then while resolving + the user list we have already received new key from server. Don't + replace it with this old key. */ + if (!channel->internal.send_key) { + silc_buffer_set(&keyp, tmp, len); + silc_client_save_channel_key(client, conn, &keyp, channel); + } } /* Get topic */