updates.
[silc.git] / apps / silcd / packet_send.c
index 6764fb8c23beb88e96b666a8a132b6189e9cc18b..814758b82a4806190b4805b4d2bcf4f8c8657f98 100644 (file)
@@ -725,6 +725,9 @@ void silc_server_packet_relay_to_channel(SilcServer server,
            memcpy(tmp, data, data_len);
 
            /* Decrypt the channel message (we don't check the MAC) */
+           /* XXX this could be optimized and removed all together by
+              taking a copy of the original data before encrypting it
+              and thus would not required decrypting. */
            if (channel->channel_key &&
                !silc_channel_message_payload_decrypt(tmp, data_len, 
                                                      channel->channel_key,
@@ -1074,15 +1077,15 @@ void silc_server_send_notify_cumode(SilcServer server,
                                    int broadcast,
                                    SilcChannelEntry channel,
                                    uint32 mode_mask,
-                                   SilcClientID *client_id,
-                                   uint32 client_id_len,
+                                   void *id, SilcIdType id_type,
+                                   uint32 id_len,
                                    SilcClientID *target,
                                    uint32 target_len)
 {
   SilcBuffer idp1, idp2;
   unsigned char mode[4];
 
-  idp1 = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
+  idp1 = silc_id_payload_encode((void *)id, id_type);
   idp2 = silc_id_payload_encode((void *)target, SILC_ID_CLIENT);
   SILC_PUT32_MSB(mode_mask, mode);