+Sun Aug 26 12:28:49 EEST 2007 Pekka Riikonen <priikone@silcnet.org>
+
+ * Fixed TIMEOUT handling in user info resolving during JOINing,
+ fixes crash. Affected file is lib/silcclient/client_notify.c.
+
Tue Jul 10 20:02:04 EEST 2007 Pekka Riikonen <priikone@silcnet.org>
* Added support for new PKCS API and other API changes from
SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
SilcUInt16 idp_len, cmd_ident;
SilcID id;
- va_list tmp;
int i;
SILC_LOG_DEBUG(("Resolve clients from Client ID list"));
/* We have the clients in cache, get them and call the completion */
silc_client_get_clients_list_cb(client, conn, SILC_COMMAND_WHOIS,
- SILC_STATUS_OK, SILC_STATUS_OK, in, tmp);
+ SILC_STATUS_OK, SILC_STATUS_OK, in, NULL);
return 0;
err:
/* If entry is still invalid, resolving failed. Finish notify processing. */
if (notify->client_entry && !notify->client_entry->internal.valid) {
/* If resolving timedout try it again many times. */
- if (status != SILC_STATUS_ERR_TIMEDOUT || ++notify->resolve_retry > 1000)
+ 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);
+
+ /* Unref client only in case of non-timeout error. In case of timeout
+ occurred, the routine reprocessing the notify is expected not to
+ create new references of the entry. */
+ silc_client_unref_client(client, conn, notify->client_entry);
+ }
}
/* If no entries found, just finish the notify processing */
if (tmp && tmp_len > 128)
tmp[128] = '\0';
- if (packet->dst_id_type == SILC_ID_CHANNEL)
+ if (packet->dst_id_type == SILC_ID_CHANNEL)
if (silc_id_str2id(packet->dst_id, packet->dst_id_len, SILC_ID_CHANNEL,
&id.u.channel_id, sizeof(id.u.channel_id)))
channel = silc_client_get_channel_by_id(client, conn, &id.u.channel_id);
SilcNotifyType type = silc_notify_get_type(payload);
SilcArgumentPayload args = silc_notify_get_args(payload);
SilcClientEntry client_entry = NULL;
- unsigned char *tmp, oldnick[128 + 1];
+ unsigned char *tmp, oldnick[256 + 1];
SilcUInt32 tmp_len;
SilcID id, id2;
SilcBool valid;
goto out;
}
if (!silc_public_key_payload_decode(tmp, len, &public_key)) {
+ SAY(client, conn, SILC_CLIENT_MESSAGE_COMMAND_ERROR,
+ "Cannot decode public key: malformed/unsupported public key");
ERROR_CALLBACK(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}