From dc28ce1efe35f1a8cf655bc1d29e1b705e98f718 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Mon, 26 Mar 2001 14:41:54 +0000 Subject: [PATCH] updates. --- CHANGES | 13 +++++++++++++ apps/silcd/protocol.c | 3 +++ apps/silcd/server.c | 3 ++- lib/silcclient/client_notify.c | 2 ++ lib/silcclient/command.c | 15 --------------- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index f20ba39e..c047d18c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,16 @@ +Mon Mar 26 14:39:48 EEST 2001 Pekka Riikonen + + * 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 * Added silc_server_send_notify_invite to send the INVITE diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index 1c033557..8275145d 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -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; diff --git a/apps/silcd/server.c b/apps/silcd/server.c index a82d494c..df6a94db 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -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) diff --git a/lib/silcclient/client_notify.c b/lib/silcclient/client_notify.c index 744ad289..bccd1009 100644 --- a/lib/silcclient/client_notify.c +++ b/lib/silcclient/client_notify.c @@ -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) diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index 82b07fb3..cf3c0c4e 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -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); -- 2.24.0