From: kubistika Date: Sun, 4 Aug 2019 14:32:12 +0000 (+0300) Subject: channels: cliprdr: add lastRequestedFormatId X-Git-Tag: 2.0.0~383 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cebbc2a16c353d1454182401c172a5ea57b2455;p=platform%2Fupstream%2Ffreerdp.git channels: cliprdr: add lastRequestedFormatId This one is for proxy use. The proxy must know what format is requested by the other side of the connection, for determining if the message should be passed or ignore (for example, if we want to allow only text, the proxy must verify that the requested format received in Format Data Request PDU is a text format. --- diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index a97a584..8a4282d 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -295,7 +295,7 @@ UINT cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UIN Stream_Read_UINT32(s, formatDataRequest.requestedFormatId); /* requestedFormatId (4 bytes) */ - + context->lastRequestedFormatId = formatDataRequest.requestedFormatId; IFCALLRET(context->ServerFormatDataRequest, error, context, &formatDataRequest); if (error) WLog_ERR(TAG, "ServerFormatDataRequest failed with error %"PRIu32"!", error); diff --git a/channels/cliprdr/server/cliprdr_main.c b/channels/cliprdr/server/cliprdr_main.c index fa22065..39f5a77 100644 --- a/channels/cliprdr/server/cliprdr_main.c +++ b/channels/cliprdr/server/cliprdr_main.c @@ -911,6 +911,7 @@ static UINT cliprdr_server_receive_format_data_request(CliprdrServerContext* Stream_Read_UINT32(s, formatDataRequest.requestedFormatId); /* requestedFormatId (4 bytes) */ + context->lastRequestedFormatId = formatDataRequest.requestedFormatId; IFCALLRET(context->ClientFormatDataRequest, error, context, &formatDataRequest); if (error) diff --git a/include/freerdp/client/cliprdr.h b/include/freerdp/client/cliprdr.h index a326969..9f435e0 100644 --- a/include/freerdp/client/cliprdr.h +++ b/include/freerdp/client/cliprdr.h @@ -81,6 +81,7 @@ struct _cliprdr_client_context pcCliprdrClientFileContentsResponse ClientFileContentsResponse; pcCliprdrServerFileContentsResponse ServerFileContentsResponse; + UINT32 lastRequestedFormatId; rdpContext* rdpcontext; }; diff --git a/include/freerdp/server/cliprdr.h b/include/freerdp/server/cliprdr.h index fe4bc27..440b8af 100644 --- a/include/freerdp/server/cliprdr.h +++ b/include/freerdp/server/cliprdr.h @@ -103,6 +103,7 @@ struct _cliprdr_server_context psCliprdrServerFileContentsResponse ServerFileContentsResponse; rdpContext* rdpcontext; + UINT32 lastRequestedFormatId; }; #ifdef __cplusplus