Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2008 Pekka Riikonen
+ Copyright (C) 1997 - 2014 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
SilcClientConnection conn = fsm_context;
SilcClientCommandContext cmd;
+ SilcList list;
+ SilcIDCacheEntry entry;
+ SilcClientEntry client_entry;
/* Finish running command threads. This will also finish waiting packet
thread, as they are always waiting for some command. If any thread is
conn->internal->op = NULL;
}
+ /* Abort ongoing client entry operations */
+ if (conn->internal->client_cache) {
+ if (silc_idcache_get_all(conn->internal->client_cache, &list)) {
+ silc_list_start(list);
+ while ((entry = silc_list_get(list))) {
+ client_entry = entry->context;
+ if (client_entry->internal.op) {
+ silc_async_abort(client_entry->internal.op, NULL, NULL);
+ client_entry->internal.op = NULL;
+ }
+ }
+ }
+ }
+
/* If event thread is running, finish it. */
if (silc_fsm_is_started(&conn->internal->event_thread)) {
SILC_LOG_DEBUG(("Finish event thread"));
msg = silc_memdup(silc_buffer_data(&packet->buffer),
silc_buffer_len(&packet->buffer));
if (msg)
- client->internal->ops->say(client, conn, SILC_CLIENT_MESSAGE_AUDIT, msg);
+ client->internal->ops->say(client, conn, SILC_CLIENT_MESSAGE_ERROR, msg);
silc_free(msg);
silc_packet_free(packet);
SILC_LOG_DEBUG(("Connecting to server"));
- if (!client || !remote_host)
+ if (!client || !remote_host || !callback)
return NULL;
if (client->internal->run_callback) {
SILC_LOG_DEBUG(("Connecting to client"));
- if (!client || !remote_host)
+ if (!client || !remote_host || !callback)
return NULL;
if (client->internal->run_callback) {
SILC_LOG_DEBUG(("Performing key exchange"));
- if (!client || !stream)
+ if (!client || !stream || !callback)
return NULL;
if (client->internal->run_callback) {