Added debugs.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 6 Nov 2007 10:17:49 +0000 (10:17 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 6 Nov 2007 10:17:49 +0000 (10:17 +0000)
lib/silcclient/client_channel.c
lib/silcclient/client_entry.c
lib/silcclient/client_keyagr.c
lib/silcclient/client_prvmsg.c

index 4fcfb08c214c2667785f1767f8a372c045254f25..2075d8073b0c6230c6e605b6d7a1aebd08430e17 100644 (file)
@@ -68,8 +68,11 @@ SilcBool silc_client_send_channel_message(SilcClient client,
 
   if (silc_unlikely(!client || !conn || !channel))
     return FALSE;
-  if (silc_unlikely(flags & SILC_MESSAGE_FLAG_SIGNED && !hash))
+  if (silc_unlikely(flags & SILC_MESSAGE_FLAG_SIGNED && !hash)) {
+    SILC_LOG_ERROR(("Cannot send signed message without hash, missing "
+                   "arguments"));
     return FALSE;
+  }
   if (silc_unlikely(conn->internal->disconnected))
     return FALSE;
 
index 2a26931ae9cac71fafa5ec849a418cde2322a3f9..9510b40441ae4b9be375982ad6895f0c65fe361e 100644 (file)
@@ -1720,6 +1720,7 @@ SilcBool silc_client_del_channel(SilcClient client, SilcClientConnection conn,
     return FALSE;
 
   silc_client_empty_channel(client, conn, channel);
+  silc_client_del_channel_private_keys(client, conn, channel);
   silc_hash_table_free(channel->user_list);
   silc_free(channel->channel_name);
   silc_free(channel->topic);
@@ -1746,7 +1747,6 @@ SilcBool silc_client_del_channel(SilcClient client, SilcClientConnection conn,
   if (channel->channel_pubkeys)
     silc_argument_list_free(channel->channel_pubkeys,
                            SILC_ARGUMENT_PUBLIC_KEY);
-  silc_client_del_channel_private_keys(client, conn, channel);
   silc_atomic_uninit16(&channel->internal.refcnt);
   silc_rwlock_free(channel->internal.lock);
   silc_schedule_task_del_by_context(conn->client->schedule, channel);
index 221bd8a30392bdc8716e4dea0d306f39dbeef02e..6a93b061278022fb497d49a546c4e377de4650e7 100644 (file)
@@ -60,6 +60,9 @@ SILC_TASK_CALLBACK(silc_client_keyagr_timeout)
   SilcClientEntry client_entry = context;
   SilcClientKeyAgreement ke = client_entry->internal.ke;
 
+  if (!ke)
+    return;
+
   SILC_LOG_DEBUG(("Key agreement %p timeout", ke));
 
   ke->completion(ke->client, ke->conn, client_entry,
index a29ad586ad57e268ba8c924269576f1163ad8289..1f7eaf019d90a79dc514eee760b5bdbdf977cad4 100644 (file)
@@ -64,8 +64,11 @@ SilcBool silc_client_send_private_message(SilcClient client,
 
   if (silc_unlikely(!client || !conn || !client_entry))
     return FALSE;
-  if (silc_unlikely(flags & SILC_MESSAGE_FLAG_SIGNED && !hash))
+  if (silc_unlikely(flags & SILC_MESSAGE_FLAG_SIGNED && !hash)) {
+    SILC_LOG_ERROR(("Cannot send signed message without hash, missing "
+                   "arguments"));
     return FALSE;
+  }
   if (silc_unlikely(conn->internal->disconnected))
     return FALSE;