SilcChannelEntry channel;
SilcBuffer id_payload;
- id_payload = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL_LEN,
- SILC_ID_CHANNEL);
-
/* Remove the client from all channels. The client is removed from
the channels' user list. */
for (i = 0; i < client->channel_count; i++) {
if (!channel)
continue;
+ id_payload = silc_id_payload_encode(channel->id, SILC_ID_CHANNEL_LEN,
+ SILC_ID_CHANNEL);
+
/* Remove from channel */
for (k = 0; k < channel->user_list_count; k++) {
if (channel->user_list[k].client == client) {
id_payload->len);
}
}
+
+ silc_id_payload_free(id_payload);
}
if (client->channel_count)
silc_free(client->channel);
client->channel = NULL;
- silc_buffer_free(id_payload);
}
/* Removes client from one channel. This is used for example when client