From 067a8704cb8826bb57ce41c55d7b1e03ee3515c2 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Thu, 31 Jan 2002 21:31:44 +0000 Subject: [PATCH] updates. --- CHANGES | 6 ++++++ apps/silcd/serverincludes.h | 2 +- lib/silcclient/client_prvmsg.c | 6 +----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index ef1aca76..cd1b5929 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Thu Jan 31 23:34:33 EET 2002 Pekka Riikonen + + * Fixed private message handling. It used some old code that + caused the client to crash. Affecte file is + lib/silcclient/client_prvmsg.c. + Thu Jan 31 19:06:22 EET 2002 Pekka Riikonen * Added function silc_client_add_channel, diff --git a/apps/silcd/serverincludes.h b/apps/silcd/serverincludes.h index be913daa..1b2fa802 100644 --- a/apps/silcd/serverincludes.h +++ b/apps/silcd/serverincludes.h @@ -26,8 +26,8 @@ /* SILC Server includes */ #include "idlist.h" -#include "serverconfig.h" #include "server.h" +#include "serverconfig.h" #include "serverid.h" #include "server_util.h" #include "packet_send.h" diff --git a/lib/silcclient/client_prvmsg.c b/lib/silcclient/client_prvmsg.c index 9dc86214..450fb405 100644 --- a/lib/silcclient/client_prvmsg.c +++ b/lib/silcclient/client_prvmsg.c @@ -147,7 +147,6 @@ void silc_client_private_message(SilcClient client, { SilcClientConnection conn = (SilcClientConnection)sock->user_data; SilcPrivateMessagePayload payload = NULL; - SilcIDCacheEntry id_cache = NULL; SilcClientID *remote_id = NULL; SilcClientEntry remote_client; SilcMessageFlags flags; @@ -162,11 +161,8 @@ void silc_client_private_message(SilcClient client, /* Check whether we know this client already */ remote_client = silc_client_get_client_by_id(client, conn, remote_id); - if (!remote_client || - ((SilcClientEntry)id_cache->context)->nickname == NULL) { - + if (!remote_client || !remote_client->nickname) { if (remote_client) { - remote_client = (SilcClientEntry)id_cache->context; if (remote_client->status & SILC_CLIENT_STATUS_RESOLVING) { remote_client->status &= ~SILC_CLIENT_STATUS_RESOLVING; goto out; -- 2.24.0