Started implementing protocol version 1.1 and narrowing down
[silc.git] / lib / silcclient / client_prvmsg.c
index c229b4509655c111fe43e21c6f0fc45d8922a6d7..a6e09917b0853f1f4e2183fb2c713a10f59e2645 100644 (file)
@@ -148,6 +148,8 @@ void silc_client_private_message(SilcClient client,
   SilcClientID *remote_id = NULL;
   SilcClientEntry remote_client;
   SilcMessageFlags flags;
+  unsigned char *message;
+  SilcUInt32 message_len;
 
   if (packet->src_id_type != SILC_ID_CLIENT)
     goto out;
@@ -187,10 +189,9 @@ void silc_client_private_message(SilcClient client,
   flags = silc_private_message_get_flags(payload);
 
   /* Pass the private message to application */
-  client->internal->ops->private_message(
-                                client, conn, remote_client, flags,
-                                silc_private_message_get_message(payload, 
-                                                                 NULL));
+  message = silc_private_message_get_message(payload, &message_len);
+  client->internal->ops->private_message(client, conn, remote_client, flags,
+                                        message, message_len);
 
   /* See if we are away (gone). If we are away we will reply to the
      sender with the set away message. */