updates.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 26 Mar 2001 14:41:54 +0000 (14:41 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 26 Mar 2001 14:41:54 +0000 (14:41 +0000)
CHANGES
apps/silcd/protocol.c
apps/silcd/server.c
lib/silcclient/client_notify.c
lib/silcclient/command.c

diff --git a/CHANGES b/CHANGES
index f20ba39e45370fe527e7809b5d3f09217c8f6344..c047d18c4ed5441e0ea843f7145cb8ef4fbad181 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,16 @@
+Mon Mar 26 14:39:48 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Show the version of the remote client (or server) when connecting
+         to the server.  It is logged to the log file.  Affected file
+         is silcd/protocol.c.
+
+       * Fixed the KILLED notify handling in the client library.  The
+         client must be removed from all channels when receiving the
+         KILLED notify.
+
+         Also, do not remove the client entry when giving the KILL 
+         command but when the KILLED notify is received.
+
 Mon Mar 26 12:11:14 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added silc_server_send_notify_invite to send the INVITE
index 1c0335571050b3324d8c11e464c23c5723d1b214..8275145db84c5a4f32026007b18ecfeacc03999e 100644 (file)
@@ -143,6 +143,9 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
 {
   SilcSKEStatus status = SILC_SKE_STATUS_OK;
 
+  SILC_LOG_INFO(("%s (%s) is version %s", ske->sock->hostname,
+                ske->sock->ip, version));
+
   /* Check for initial version string */
   if (!strstr(version, "SILC-1.0-"))
     status = SILC_SKE_STATUS_BAD_VERSION;
index a82d494c862250c75b6ed7b91d64ab3801802adf..df6a94db45eb4bf98f9a345bd042518dab4e1aea 100644 (file)
@@ -2003,7 +2003,8 @@ void silc_server_free_client_data(SilcServer server,
 
   /* If there is pending outgoing data for the client then purge it
      to the network before removing the client entry. */
-  if (SILC_IS_OUTBUF_PENDING(sock) && (SILC_IS_DISCONNECTED(sock) == FALSE)) {
+  if (sock && SILC_IS_OUTBUF_PENDING(sock) && 
+      (SILC_IS_DISCONNECTED(sock) == FALSE)) {
     server->stat.packets_sent++;
 
     if (sock->outbuf->data - sock->outbuf->head)
index 744ad2893c3b4a59eb9f0f4158f899ecb854df1c..bccd100986430c01d5f4aec8b497cbd96746e62c 100644 (file)
@@ -663,6 +663,8 @@ void silc_client_notify_by_server(SilcClient client,
     client->ops->notify(client, conn, type, client_entry, tmp);
 
     if (client_entry != conn->local_entry) {
+      /* Remove client from all channels */
+      silc_client_remove_from_channels(client, conn, client_entry);
       silc_idcache_del_by_id(conn->client_cache, SILC_ID_CLIENT, 
                             client_entry->id);
       if (client_entry->nickname)
index 82b07fb3f186e3fcbc85f03e26a3d8b75b9a7abf..cf3c0c4e7ab06262d03168ac9b773f17a03588e7 100644 (file)
@@ -792,21 +792,6 @@ SILC_CLIENT_CMD_FUNC(kill)
   /* Notify application */
   COMMAND;
 
-  /* Remove the client entry to be killed */
-  silc_idcache_del_by_id(conn->client_cache, SILC_ID_CLIENT, 
-                        target->id);
-  if (target->nickname)
-    silc_free(target->nickname);
-  if (target->server)
-    silc_free(target->server);
-  if (target->id)
-    silc_free(target->id);
-  if (target->send_key)
-    silc_cipher_free(target->send_key);
-  if (target->receive_key)
-    silc_cipher_free(target->receive_key);
-  silc_free(target);
-
  out:
   if (nickname)
     silc_free(nickname);