Make a copy of the formats list so that we can properly resend it when the
server is too busy to accept it. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1201 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
1946b02f65
commit
11d219de02
16
cliprdr.c
16
cliprdr.c
@ -33,6 +33,9 @@
|
||||
|
||||
static VCHANNEL *cliprdr_channel;
|
||||
|
||||
static uint8 *last_formats = NULL;
|
||||
static uint32 last_formats_length = 0;
|
||||
|
||||
static void
|
||||
cliprdr_send_packet(uint16 type, uint16 status, uint8 * data, uint32 length)
|
||||
{
|
||||
@ -75,8 +78,19 @@ void
|
||||
cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length)
|
||||
{
|
||||
DEBUG_CLIPBOARD(("cliprdr_send_native_format_announce\n"));
|
||||
|
||||
cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, formats_data,
|
||||
formats_data_length);
|
||||
|
||||
if (formats_data != last_formats)
|
||||
{
|
||||
if (last_formats)
|
||||
xfree(last_formats);
|
||||
|
||||
last_formats = xmalloc(formats_data_length);
|
||||
memcpy(last_formats, formats_data, formats_data_length);
|
||||
last_formats_length = formats_data_length;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -116,7 +130,7 @@ cliprdr_process(STREAM s)
|
||||
{
|
||||
/* FIXME: We seem to get this when we send an announce while the server is
|
||||
still processing a paste. Try sending another announce. */
|
||||
cliprdr_send_simple_native_format_announce(CF_TEXT);
|
||||
cliprdr_send_native_format_announce(last_formats, last_formats_length);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user