Fixed clipboard file contents response and message to string.
authorArmin Novak <armin.novak@thincast.com>
Thu, 22 Oct 2015 07:01:30 +0000 (09:01 +0200)
committerArmin Novak <armin.novak@thincast.com>
Tue, 27 Oct 2015 09:44:31 +0000 (10:44 +0100)
channels/cliprdr/client/cliprdr_main.c

index 7086633..18b594e 100644 (file)
@@ -46,7 +46,7 @@ const char* const CB_MSG_TYPE_STRINGS[] =
        "CB_CLIP_CAPS",
        "CB_FILECONTENTS_REQUEST",
        "CB_FILECONTENTS_RESPONSE",
-       "CB_LOCK_CLIPDATA"
+       "CB_LOCK_CLIPDATA",
        "CB_UNLOCK_CLIPDATA"
 };
 
@@ -471,9 +471,9 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
        Stream_Read_UINT16(s, msgFlags); /* msgFlags (2 bytes) */
        Stream_Read_UINT32(s, dataLen); /* dataLen (4 bytes) */
 
-       DEBUG_CLIPRDR("msgType: %s (%d), msgFlags: %d dataLen: %d",
-                                 CB_MSG_TYPE_STRINGS[msgType], msgType, msgFlags, dataLen);
 #ifdef WITH_DEBUG_CLIPRDR
+       WLog_DBG(TAG, "msgType: %s (%d), msgFlags: %d dataLen: %d",
+                                 CB_MSG_TYPE_STRINGS[msgType], msgType, msgFlags, dataLen);
        winpr_HexDump(TAG, WLOG_DEBUG, Stream_Buffer(s), dataLen + 8);
 #endif
 
@@ -910,7 +910,7 @@ UINT cliprdr_client_file_contents_response(CliprdrClientContext* context, CLIPRD
        if (fileContentsResponse->dwFlags & FILECONTENTS_SIZE)
                fileContentsResponse->cbRequested = sizeof(UINT64);
 
-       s = cliprdr_packet_new(CB_FILECONTENTS_REQUEST, 0,
+       s = cliprdr_packet_new(CB_FILECONTENTS_RESPONSE, fileContentsResponse->msgFlags,
                        4 + fileContentsResponse->cbRequested);
 
        if (!s)