updates. silc.client.0.7.5
authorPekka Riikonen <priikone@silcnet.org>
Thu, 31 Jan 2002 21:31:44 +0000 (21:31 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 31 Jan 2002 21:31:44 +0000 (21:31 +0000)
CHANGES
apps/silcd/serverincludes.h
lib/silcclient/client_prvmsg.c

diff --git a/CHANGES b/CHANGES
index ef1aca765f847284ad5e99a6904be200f859f5f7..cd1b59298d4b1b9bcbe3a4bec4aad1355c3a49bb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+Thu Jan 31 23:34:33 EET 2002  Pekka Riikonen <priikone@silcnet.org>
+
+       * 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 <priikone@silcnet.org>
 
        * Added function silc_client_add_channel, 
index be913daa56c09229fb3b373a0fea73fc37a723f7..1b2fa8021002b64e271dc5cdf0d2a9c3cc3136c4 100644 (file)
@@ -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"
index 9dc862141099d1fa5172677136133e067fc63f66..450fb40537b3e7a5cf910c99c1b9ad116cf25c83 100644 (file)
@@ -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;