Remove channel key saving callback in del_channel.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 18 Oct 2003 08:57:11 +0000 (08:57 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 18 Oct 2003 08:57:11 +0000 (08:57 +0000)
Remove client from channel after signoff notify client operation.

CHANGES
lib/silcclient/client_notify.c
lib/silcclient/idlist.c

diff --git a/CHANGES b/CHANGES
index 06d20905e194009a33056066241d5d893c8b2e60..c49299536588cd2bed0b00f493750caf2f3dc8d5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,12 @@
+Sat Oct 18 11:55:33 EEST 2003  Pekka Riikonen <priikone@silcnet.org>
+
+       * Unregister channel key saving callback when deleting channel.
+         Affected file lib/silcclient/idlist.c.
+
+       * Do not remove the client from channels in NOTIFY_TYPE_SIGNOFF
+         before calling notify client operation.  Affected file is
+         lib/silcclient/client_notify.c.
+
 Tue Oct 14 18:24:53 EEST 2003  Pekka Riikonen <priikone@silcnet.org>
 
        * Save old channel keys in list to allow more rapid change
index b5387ef345cc9b4befeb792eb3edce620bcf1491..3a48ac158557a783da17a96f38f97fa31b313210 100644 (file)
@@ -444,12 +444,6 @@ void silc_client_notify_by_server(SilcClient client,
     if (!client_entry)
       goto out;
 
-    /* Remove from all channels */
-    silc_client_remove_from_channels(client, conn, client_entry);
-
-    /* Remove from cache */
-    silc_idcache_del_by_context(conn->internal->client_cache, client_entry);
-
     /* Get signoff message */
     tmp = silc_argument_get_arg_type(args, 2, &tmp_len);
     if (tmp_len > 128)
@@ -458,6 +452,12 @@ void silc_client_notify_by_server(SilcClient client,
     /* Notify application */
     client->internal->ops->notify(client, conn, type, client_entry, tmp);
 
+    /* Remove from all channels */
+    silc_client_remove_from_channels(client, conn, client_entry);
+
+    /* Remove from cache */
+    silc_idcache_del_by_context(conn->internal->client_cache, client_entry);
+
     /* Free data */
     silc_client_del_client_entry(client, conn, client_entry);
     break;
index dfdfc6f3e5d4420367acfcd94dd0e74d5939cea7..17f3823e0c8da254569ccd751390546780b33c99 100644 (file)
@@ -983,6 +983,7 @@ bool silc_client_del_channel(SilcClient client, SilcClientConnection conn,
       silc_hmac_free(hmac);
     silc_dlist_uninit(channel->old_hmacs);
   }
+  silc_schedule_task_del_by_context(conn->client->schedule, channel);
   silc_client_del_channel_private_keys(client, conn, channel);
   silc_free(channel);
   return ret;