SilcFSMThread fsm; /* Notify FSM thread */
SilcChannelEntry channel; /* Channel entry being resolved */
SilcClientEntry client_entry; /* Client entry being resolved */
+ SilcUInt32 resolve_retry; /* Resolving retry counter */
} *SilcClientNotify;
/************************ Static utility functions **************************/
/* If entry is still invalid, resolving failed. Finish notify processing. */
if (notify->client_entry && !notify->client_entry->internal.valid) {
- silc_fsm_next(notify->fsm, silc_client_notify_processed);
+ /* If resolving timedout try it again many times. */
+ if (status != SILC_STATUS_ERR_TIMEDOUT || ++notify->resolve_retry > 1000)
+ silc_fsm_next(notify->fsm, silc_client_notify_processed);
silc_client_unref_client(client, conn, notify->client_entry);
}
if (!(channel->mode & SILC_CHANNEL_MODE_ULIMIT))
channel->user_limit = 0;
- /* Save the new mode */
- channel->mode = mode;
-
/* Get the channel public key that was added or removed */
tmp = silc_argument_get_arg_type(args, 7, &tmp_len);
if (tmp)
- silc_client_channel_save_public_keys(channel, tmp, tmp_len);
+ silc_client_channel_save_public_keys(channel, tmp, tmp_len, FALSE);
+ else if (channel->mode & SILC_CHANNEL_MODE_CHANNEL_AUTH)
+ silc_client_channel_save_public_keys(channel, NULL, 0, TRUE);
+
+ /* Save the new mode */
+ channel->mode = mode;
silc_rwlock_unlock(channel->internal.lock);
if (!silc_argument_get_decoded(args, 2, SILC_ARGUMENT_ID, &id, NULL))
goto out;
client_entry = silc_client_get_client_by_id(client, conn, &id.u.client_id);
- if (client_entry) {
+ if (client_entry && client_entry != conn->local_entry) {
silc_client_remove_from_channels(client, conn, client_entry);
silc_client_del_client(client, conn, client_entry);
silc_client_unref_client(client, conn, client_entry);