client->internal->ops->say(conn->client, conn,
SILC_CLIENT_MESSAGE_AUDIT,
"Cannot talk to channel: not joined");
client->internal->ops->say(conn->client, conn,
SILC_CLIENT_MESSAGE_AUDIT,
"Cannot talk to channel: not joined");
- if (channel->mode & SILC_CHANNEL_MODE_SILENCE_OPERS &&
- chu->mode & SILC_CHANNEL_UMODE_CHANOP &&
- !(chu->mode & SILC_CHANNEL_UMODE_CHANFO))
+ if (silc_unlikely(channel->mode & SILC_CHANNEL_MODE_SILENCE_OPERS &&
+ chu->mode & SILC_CHANNEL_UMODE_CHANOP &&
+ !(chu->mode & SILC_CHANNEL_UMODE_CHANFO)))
buffer = silc_message_payload_encode(flags, data, data_len, TRUE, FALSE,
cipher, hmac, client->rng, NULL,
conn->private_key, hash, NULL);
buffer = silc_message_payload_encode(flags, data, data_len, TRUE, FALSE,
cipher, hmac, client->rng, NULL,
conn->private_key, hash, NULL);
/** Invalid packet */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
}
/** Invalid packet */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
}
- if (!silc_id_str2id(packet->src_id, packet->src_id_len, SILC_ID_CLIENT,
- &remote_id, sizeof(remote_id))) {
+ if (silc_unlikely(!silc_id_str2id(packet->src_id,
+ packet->src_id_len, SILC_ID_CLIENT,
+ &remote_id, sizeof(remote_id)))) {
/** Invalid source ID */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
/** Invalid source ID */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
- if (!silc_id_str2id(packet->dst_id, packet->dst_id_len, SILC_ID_CHANNEL,
- &channel_id, sizeof(channel_id))) {
+ if (silc_unlikely(!silc_id_str2id(packet->dst_id, packet->dst_id_len,
+ SILC_ID_CHANNEL, &channel_id,
+ sizeof(channel_id)))) {
/** Invalid destination ID */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
/** Invalid destination ID */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
/** Unknown channel */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
}
/* Check that user is on channel */
/** Unknown channel */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
}
/* Check that user is on channel */
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
}
silc_fsm_next(fsm, silc_client_channel_message_error);
return SILC_FSM_CONTINUE;
}
/* If decryption failed and we have just performed channel key rekey
we will use the old key in decryption. If that fails too then we
cannot do more and will drop the packet. */
/* If decryption failed and we have just performed channel key rekey
we will use the old key in decryption. If that fails too then we
cannot do more and will drop the packet. */
payload = silc_channel_key_payload_parse(silc_buffer_data(key_payload),
silc_buffer_len(key_payload));
if (!payload)
payload = silc_channel_key_payload_parse(silc_buffer_data(key_payload),
silc_buffer_len(key_payload));
if (!payload)
- silc_cipher_set_key(channel->internal.channel_key, key, tmp_len * 8);
+ silc_cipher_set_key(channel->internal.channel_key, key, tmp_len * 8, TRUE);
/* Generate HMAC key from the channel key data and set it */
if (!silc_hmac_alloc(hmac, NULL, &entry->hmac)) {
/* Generate HMAC key from the channel key data and set it */
if (!silc_hmac_alloc(hmac, NULL, &entry->hmac)) {