Handle when server sends a failure back for a clipboard request.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1210 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Pierre Ossman 2006-03-27 12:29:29 +00:00
parent 0732aaa60a
commit ce69fe16be
3 changed files with 20 additions and 6 deletions

View File

@ -126,15 +126,21 @@ cliprdr_process(STREAM s)
if (status == CLIPRDR_ERROR)
{
if (type == CLIPRDR_FORMAT_ACK)
switch (type)
{
/* 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_native_format_announce(last_formats, last_formats_length);
return;
case CLIPRDR_FORMAT_ACK:
/* 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_native_format_announce(last_formats,
last_formats_length);
break;
case CLIPRDR_DATA_RESPONSE:
ui_clip_request_failed();
break;
default:
DEBUG_CLIPBOARD(("CLIPRDR error (type=%d)\n", type));
}
DEBUG_CLIPBOARD(("CLIPRDR error (type=%d)\n", type));
return;
}

View File

@ -204,6 +204,7 @@ void tcp_reset_state(void);
/* xclip.c */
void ui_clip_format_announce(uint8 * data, uint32 length);
void ui_clip_handle_data(uint8 * data, uint32 length);
void ui_clip_request_failed(void);
void ui_clip_request_data(uint32 format);
void ui_clip_sync(void);
void ui_clip_set_mode(const char *optarg);

View File

@ -898,6 +898,13 @@ ui_clip_handle_data(uint8 * data, uint32 length)
free(data);
}
void
ui_clip_request_failed()
{
xclip_refuse_selection(&selection_request);
has_selection_request = False;
}
void
ui_clip_request_data(uint32 format)
{