+Mon Apr 29 09:48:12 CEST 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * Remove pending command callbacks also if the connection
+ to the server is destroyed. Affected file is
+ lib/silcclient/client.c.
+
Sat Apr 27 19:52:32 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
* Added new QUIET channel user mode that can be used to
/* Free all cache entries */
SilcIDCacheList list;
SilcIDCacheEntry entry;
+ SilcClientCommandPending *r;
bool ret;
if (silc_idcache_get_all(conn->client_cache, &list)) {
silc_hmac_free(conn->hmac_send);
if (conn->hmac_receive)
silc_hmac_free(conn->hmac_receive);
- if (conn->pending_commands)
- silc_dlist_uninit(conn->pending_commands);
if (conn->rekey)
silc_free(conn->rekey);
silc_client_ftp_free_sessions(client, conn);
+ silc_dlist_start(conn->pending_commands);
+ while ((r = silc_dlist_get(conn->pending_commands)) != SILC_LIST_END)
+ silc_dlist_del(conn->pending_commands, r);
+ if (conn->pending_commands)
+ silc_dlist_uninit(conn->pending_commands);
+
memset(conn, 0, sizeof(*conn));
silc_client_del_connection(client, conn);
}