if (!channel)
goto out;
+ /* If this client is not on channel, add it there since it clearly
+ is there. */
+ if (!silc_client_on_channel(channel, clients[0])) {
+ SilcChannelUser chu = silc_calloc(1, sizeof(*chu));
+ chu->client = clients[0];
+ chu->channel = channel;
+ silc_hash_table_add(channel->user_list, clients[0], chu);
+ silc_hash_table_add(clients[0]->channels, channel, chu);
+ }
+
message = silc_channel_message_get_data(res->payload, NULL);
/* Pass the message to application */
we will use the old key in decryption. If that fails too then we
cannot do more and will drop the packet. */
if (!payload) {
- if (!channel->old_channel_key)
+ if (!channel->old_channel_key) {
goto out;
+ }
payload = silc_channel_message_payload_parse(buffer->data, buffer->len,
channel->old_channel_key,
channel->old_hmac);
- if (!payload)
+ if (!payload) {
goto out;
+ }
}
} else if (channel->private_keys) {
SilcChannelPrivateKey entry;