33 |
|
|
34 |
static VCHANNEL *cliprdr_channel; |
static VCHANNEL *cliprdr_channel; |
35 |
|
|
36 |
|
static uint8 *last_formats = NULL; |
37 |
|
static uint32 last_formats_length = 0; |
38 |
|
|
39 |
static void |
static void |
40 |
cliprdr_send_packet(uint16 type, uint16 status, uint8 * data, uint32 length) |
cliprdr_send_packet(uint16 type, uint16 status, uint8 * data, uint32 length) |
41 |
{ |
{ |
78 |
cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length) |
cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length) |
79 |
{ |
{ |
80 |
DEBUG_CLIPBOARD(("cliprdr_send_native_format_announce\n")); |
DEBUG_CLIPBOARD(("cliprdr_send_native_format_announce\n")); |
81 |
|
|
82 |
cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, formats_data, |
cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, formats_data, |
83 |
formats_data_length); |
formats_data_length); |
84 |
|
|
85 |
|
if (formats_data != last_formats) |
86 |
|
{ |
87 |
|
if (last_formats) |
88 |
|
xfree(last_formats); |
89 |
|
|
90 |
|
last_formats = xmalloc(formats_data_length); |
91 |
|
memcpy(last_formats, formats_data, formats_data_length); |
92 |
|
last_formats_length = formats_data_length; |
93 |
|
} |
94 |
} |
} |
95 |
|
|
96 |
void |
void |
130 |
{ |
{ |
131 |
/* FIXME: We seem to get this when we send an announce while the server is |
/* FIXME: We seem to get this when we send an announce while the server is |
132 |
still processing a paste. Try sending another announce. */ |
still processing a paste. Try sending another announce. */ |
133 |
cliprdr_send_simple_native_format_announce(CF_TEXT); |
cliprdr_send_native_format_announce(last_formats, last_formats_length); |
134 |
return; |
return; |
135 |
} |
} |
136 |
|
|