continue;
}
+ if (server->server_type == SILC_ROUTER && !route)
+ continue;
+
/* Send to locally connected client */
if (client) {
SILC_LOG_DEBUG(("Start"));
- clid = silc_id_id2str(client_id, SILC_ID_CLIENT);
- if (!clid)
- return;
-
chid = silc_id_id2str(channel_id, SILC_ID_CHANNEL);
if (!chid)
return;
+ clid = silc_id_id2str(client_id, SILC_ID_CLIENT);
+ if (!clid)
+ return;
+
packet = silc_buffer_alloc(2 + 2 + channel_id_len + client_id_len);
silc_buffer_pull_tail(packet, SILC_BUFFER_END(packet));
silc_buffer_format(packet,
/* Send Channel Key payload to distribute the new channel key. Normal server
sends this to router when new client joins to existing channel. Router
- sends this to the local server who forwarded join command in case where
- the channel did not exist yet. Both normal and router servers uses this
+ sends this to the local server who sent the join command in case where
+ the channel did not exist yet. Both normal and router servers uses this
also to send this to locally connected clients on the channel. This
- must not be broadcasted packet. */
+ must not be broadcasted packet. Routers do not send this to each other. */
void silc_server_send_channel_key(SilcServer server,
SilcChannelEntry channel,