updates.
[silc.git] / lib / silcclient / client_prvmsg.c
index 2f10542746658fd3fe4856463164d5e79c93933c..331e1d6990cba16b376e7c500f3b4b8a5f187042 100644 (file)
@@ -147,7 +147,7 @@ void silc_client_private_message(SilcClient client,
 {
   SilcClientConnection conn = (SilcClientConnection)sock->user_data;
   SilcPrivateMessagePayload payload = NULL;
-  SilcIDCacheEntry id_cache;
+  SilcIDCacheEntry id_cache = NULL;
   SilcClientID *remote_id = NULL;
   SilcClientEntry remote_client;
   SilcMessageFlags flags;
@@ -186,7 +186,8 @@ void silc_client_private_message(SilcClient client,
   remote_client = (SilcClientEntry)id_cache->context;
 
   /* Parse the payload and decrypt it also if private message key is set */
-  payload = silc_private_message_payload_parse(packet->buffer,
+  payload = silc_private_message_payload_parse(packet->buffer->data,
+                                              packet->buffer->len,
                                               remote_client->receive_key);
   if (!payload) {
     silc_free(remote_id);