Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2007 Pekka Riikonen
+ Copyright (C) 1997 - 2009 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
routed = silc_calloc(silc_hash_table_count(channel->user_list),
sizeof(*routed));
+ if (!routed)
+ goto out;
/* Send the message to clients on the channel's client list. */
silc_hash_table_list(channel->user_list, &htl);
}
}
+ if (!silc_hash_table_count(channel->user_list)) {
+ SILC_LOG_DEBUG(("Channel %s is empty", channel->channel_name));
+ return;
+ }
+
routed = silc_calloc(silc_hash_table_count(channel->user_list),
sizeof(*routed));
+ if (!routed)
+ return;
/* Assure we won't route the message back to the sender's way. */
if (sender_entry->router)
va_end(ap);
}
+/* Send the heartbeat packet. */
+
+void silc_server_send_heartbeat(SilcServer server,
+ SilcPacketStream sock)
+{
+ silc_server_packet_send(server, sock, SILC_PACKET_HEARTBEAT, 0,
+ NULL, 0);
+}
+
/* Routine used to send the connection authentication packet. */
void silc_server_send_connection_auth_request(SilcServer server,