* Report packet engine errors to client application. Affected
file is lib/silcclient/client.c.
+ * If channel user list could not be resolved or was not even
+ closely fully resolved, report it to application. Affected
+ file is lib/silcclient/command_reply.c.
+
Tue Nov 13 18:24:56 EET 2007 Pekka Riikonen <priikone@silcnet.org>
* Added missing channel unreferencing in CMODE, CUMODE,
{
SilcClientCommandContext cmd = context;
SilcChannelEntry channel = cmd->context;
+ SilcCommandPayload payload = silc_fsm_get_state_context(&cmd->thread);
+ SilcArgumentPayload args = silc_command_get_args(payload);
+ SilcUInt32 list_count;
+ unsigned char *tmp;
+ char msg[512];
+
+ if (!clients) {
+ silc_snprintf(msg, sizeof(msg), "Error resolving channel %s user list",
+ channel->channel_name);
+ SAY(client, conn, SILC_CLIENT_MESSAGE_COMMAND_ERROR, msg);
+ } else {
+ tmp = silc_argument_get_arg_type(args, 12, NULL);
+ if (tmp) {
+ SILC_GET32_MSB(list_count, tmp);
+ if (list_count - silc_dlist_count(clients) > 5) {
+ silc_snprintf(msg, sizeof(msg),
+ "Channel %s user list was not fully resolved. "
+ "The channel may not be fully synced.",
+ channel->channel_name);
+ SAY(client, conn, SILC_CLIENT_MESSAGE_WARNING, msg);
+ }
+ }
+ }
channel->internal.resolve_cmd_ident = 0;
silc_client_unref_channel(client, conn, channel);
/* Get the list count */
tmp = silc_argument_get_arg_type(args, 12, &len);
- if (!tmp) {
+ if (!tmp || len != 4) {
ERROR_CALLBACK(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
*
* If FALSE is returned in this function this callback will not be called
* again for `command' even if there are more comand replies. By returning
- * FALSE the caller my stop the command reply handling when needed.
+ * FALSE the caller may stop the command reply handling when needed.
*
***/
typedef SilcBool (*SilcClientCommandReply)(SilcClient client,