From 39b624a211a20e5f9b0cb6eec10746a8dab84a21 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sun, 16 Oct 2016 10:28:06 +0200 Subject: [PATCH 1/4] GFX: support 10.2 stack. --- channels/rdpgfx/client/rdpgfx_main.c | 5 ++++- channels/rdpgfx/server/rdpgfx_main.c | 22 +++++++++++----------- include/freerdp/channels/rdpgfx.h | 2 ++ server/shadow/shadow_client.c | 26 +++++++++++++++++++++++--- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/channels/rdpgfx/client/rdpgfx_main.c b/channels/rdpgfx/client/rdpgfx_main.c index 23782db2e..e348e366c 100644 --- a/channels/rdpgfx/client/rdpgfx_main.c +++ b/channels/rdpgfx/client/rdpgfx_main.c @@ -60,7 +60,7 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback) RDPGFX_PLUGIN* gfx; RDPGFX_HEADER header; RDPGFX_CAPSET* capsSet; - RDPGFX_CAPSET capsSets[3]; + RDPGFX_CAPSET capsSets[RDPGFX_NUMBER_CAPSETS]; RDPGFX_CAPS_ADVERTISE_PDU pdu; gfx = (RDPGFX_PLUGIN*) callback->plugin; header.flags = 0; @@ -101,6 +101,9 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback) if (!gfx->H264) capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED; + + capsSets[pdu.capsSetCount] = *capsSet; + capsSets[pdu.capsSetCount++].version = RDPGFX_CAPVERSION_102; } header.pduLength = RDPGFX_HEADER_SIZE + 2 + (pdu.capsSetCount * diff --git a/channels/rdpgfx/server/rdpgfx_main.c b/channels/rdpgfx/server/rdpgfx_main.c index 47d2bf4a3..4f6452564 100644 --- a/channels/rdpgfx/server/rdpgfx_main.c +++ b/channels/rdpgfx/server/rdpgfx_main.c @@ -572,6 +572,7 @@ static UINT rdpgfx_write_surface_command(wStream* s, UINT32 bitmapDataStart = 0; UINT32 bitmapDataLength = 0; UINT8 pixelFormat = 0; + switch (cmd->format) { case PIXEL_FORMAT_BGRX32: @@ -1156,8 +1157,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context, wStream* s) { UINT16 index; - RDPGFX_CAPSET* capsSet; - RDPGFX_CAPSET capsSets[3]; + RDPGFX_CAPSET* capsSets; RDPGFX_CAPS_ADVERTISE_PDU pdu; UINT error = CHANNEL_RC_OK; UINT32 capsDataLength; @@ -1170,24 +1170,22 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context, Stream_Read_UINT16(s, pdu.capsSetCount); /* capsSetCount (2 bytes) */ - if (pdu.capsSetCount > 3) - { - /* According to the latest spec, capsSetCount <= 3 */ - WLog_ERR(TAG, "capsSetCount is greater than 3: %u", pdu.capsSetCount); - return ERROR_INVALID_DATA; - } - - if (Stream_GetRemainingLength(s) < (pdu.capsSetCount * 12)) + if (Stream_GetRemainingLength(s) < (pdu.capsSetCount * RDPGFX_CAPSET_SIZE)) { WLog_ERR(TAG, "not enough data!"); return ERROR_INVALID_DATA; } + capsSets = calloc(pdu.capsSetCount, RDPGFX_CAPSET_SIZE); + + if (!capsSets) + return ERROR_OUTOFMEMORY; + pdu.capsSets = (RDPGFX_CAPSET*) capsSets; for (index = 0; index < pdu.capsSetCount; index++) { - capsSet = &(pdu.capsSets[index]); + RDPGFX_CAPSET* capsSet = &(pdu.capsSets[index]); Stream_Read_UINT32(s, capsSet->version); /* version (4 bytes) */ Stream_Read_UINT32(s, capsDataLength); /* capsDataLength (4 bytes) */ @@ -1195,6 +1193,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context, { WLog_ERR(TAG, "capsDataLength does not equal to 4: %lu", capsDataLength); + free(capsSets); return ERROR_INVALID_DATA; } @@ -1209,6 +1208,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context, WLog_ERR(TAG, "context->CapsAdvertise failed with error %lu", error); } + free(capsSets); return error; } diff --git a/include/freerdp/channels/rdpgfx.h b/include/freerdp/channels/rdpgfx.h index 97e863fef..7f737a2f8 100644 --- a/include/freerdp/channels/rdpgfx.h +++ b/include/freerdp/channels/rdpgfx.h @@ -92,7 +92,9 @@ typedef struct _RDPGFX_HEADER RDPGFX_HEADER; #define RDPGFX_CAPVERSION_8 0x00080004 #define RDPGFX_CAPVERSION_81 0x00080105 #define RDPGFX_CAPVERSION_10 0x000A0002 +#define RDPGFX_CAPVERSION_102 0x000A0200 +#define RDPGFX_NUMBER_CAPSETS 4 #define RDPGFX_CAPSET_SIZE 12 struct _RDPGFX_CAPSET diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index a536de9f7..3af9eafa0 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -617,19 +617,37 @@ static UINT shadow_client_rdpgfx_qoe_frame_acknowledge(RdpgfxServerContext* * * @return 0 on success, otherwise a Win32 error code */ -static UINT shadow_client_rdpgfx_caps_advertise(RdpgfxServerContext* context, RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise) +static UINT shadow_client_rdpgfx_caps_advertise(RdpgfxServerContext* context, + RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise) { UINT16 index; RDPGFX_CAPS_CONFIRM_PDU pdu; rdpSettings* settings = context->rdpcontext->settings; UINT32 flags = 0; - /* Request full screen update for new gfx channel */ - shadow_client_refresh_rect((rdpShadowClient *)context->custom, 0, NULL); + shadow_client_refresh_rect((rdpShadowClient*)context->custom, 0, NULL); for (index = 0; index < capsAdvertise->capsSetCount; index++) { pdu.capsSet = &(capsAdvertise->capsSets[index]); + + if (pdu.capsSet->version == RDPGFX_CAPVERSION_102) + { + if (settings) + { + flags = pdu.capsSet->flags; + settings->GfxSmallCache = (flags & RDPGFX_CAPS_FLAG_SMALL_CACHE); + settings->GfxH264 = !(flags & RDPGFX_CAPS_FLAG_AVC_DISABLED); + } + + return context->CapsConfirm(context, &pdu); + } + } + + for (index = 0; index < capsAdvertise->capsSetCount; index++) + { + pdu.capsSet = &(capsAdvertise->capsSets[index]); + if (pdu.capsSet->version == RDPGFX_CAPVERSION_10) { if (settings) @@ -642,6 +660,7 @@ static UINT shadow_client_rdpgfx_caps_advertise(RdpgfxServerContext* context, RD return context->CapsConfirm(context, &pdu); } } + for (index = 0; index < capsAdvertise->capsSetCount; index++) { if (pdu.capsSet->version == RDPGFX_CAPVERSION_81) @@ -657,6 +676,7 @@ static UINT shadow_client_rdpgfx_caps_advertise(RdpgfxServerContext* context, RD return context->CapsConfirm(context, &pdu); } } + for (index = 0; index < capsAdvertise->capsSetCount; index++) { if (pdu.capsSet->version == RDPGFX_CAPVERSION_8) From b6907aa2b1fa2c5bcebbfca77df8ca22aa94acc2 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sun, 16 Oct 2016 15:08:47 +0200 Subject: [PATCH 2/4] Deactivated unsupported operations. --- client/Wayland/wlfreerdp.c | 4 ++-- client/X11/xf_client.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/Wayland/wlfreerdp.c b/client/Wayland/wlfreerdp.c index babdc749f..2d5a93b98 100644 --- a/client/Wayland/wlfreerdp.c +++ b/client/Wayland/wlfreerdp.c @@ -136,8 +136,8 @@ static BOOL wl_pre_connect(freerdp* instance) settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE; - settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE; - settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE; + settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE; + settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; PubSub_SubscribeChannelConnected(instance->context->pubSub, diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index fb9548aab..31579d44d 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -1112,8 +1112,8 @@ static BOOL xf_pre_connect(freerdp* instance) settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE; settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE; - settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE; - settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE; + settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE; + settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; PubSub_SubscribeChannelConnected(instance->context->pubSub, From 4dfdf83d68b00ce78291d09a8d6f84c46d315ef9 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 17 Oct 2016 09:05:54 +0200 Subject: [PATCH 3/4] Updated symbol visibility of GFX channel. --- channels/rdpgfx/client/rdpgfx_codec.h | 3 ++- channels/rdpgfx/client/rdpgfx_main.c | 18 +++++++++--------- channels/rdpgfx/rdpgfx_common.c | 18 +++++++++--------- channels/rdpgfx/rdpgfx_common.h | 21 +++++++++++---------- channels/rdpgfx/server/rdpgfx_main.c | 10 +++++----- scripts/format_code.sh | 4 ++-- 6 files changed, 38 insertions(+), 36 deletions(-) diff --git a/channels/rdpgfx/client/rdpgfx_codec.h b/channels/rdpgfx/client/rdpgfx_codec.h index 45f7ef79f..03d1bac99 100644 --- a/channels/rdpgfx/client/rdpgfx_codec.h +++ b/channels/rdpgfx/client/rdpgfx_codec.h @@ -26,9 +26,10 @@ #include #include +#include #include "rdpgfx_main.h" -UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd); +FREERDP_LOCAL UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd); #endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_CODEC_H */ diff --git a/channels/rdpgfx/client/rdpgfx_main.c b/channels/rdpgfx/client/rdpgfx_main.c index e348e366c..e99e73a0a 100644 --- a/channels/rdpgfx/client/rdpgfx_main.c +++ b/channels/rdpgfx/client/rdpgfx_main.c @@ -322,8 +322,8 @@ static UINT rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback, * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback, - wStream* s) +static UINT rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback, + wStream* s) { UINT16 index; RDPGFX_CACHE_IMPORT_REPLY_PDU pdu; @@ -416,8 +416,8 @@ static UINT rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, - wStream* s) +static UINT rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, + wStream* s) { RDPGFX_DELETE_SURFACE_PDU pdu; RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin; @@ -712,7 +712,7 @@ static UINT rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK* * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s) +static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s) { UINT16 index; RECTANGLE_16* fillRect; @@ -908,8 +908,8 @@ static UINT rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback, * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, - wStream* s) +static UINT rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, + wStream* s) { UINT16 index; RDPGFX_POINT16* destPt; @@ -1014,7 +1014,7 @@ static UINT rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK* * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callback, +static UINT rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s) { RDPGFX_MAP_SURFACE_TO_WINDOW_PDU pdu; @@ -1557,7 +1557,7 @@ static UINT rdpgfx_set_cache_slot_data(RdpgfxClientContext* context, return CHANNEL_RC_OK; } -void* rdpgfx_get_cache_slot_data(RdpgfxClientContext* context, UINT16 cacheSlot) +static void* rdpgfx_get_cache_slot_data(RdpgfxClientContext* context, UINT16 cacheSlot) { void* pData = NULL; RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) context->handle; diff --git a/channels/rdpgfx/rdpgfx_common.c b/channels/rdpgfx/rdpgfx_common.c index 849554dd3..6e5dfa99f 100644 --- a/channels/rdpgfx/rdpgfx_common.c +++ b/channels/rdpgfx/rdpgfx_common.c @@ -31,7 +31,7 @@ #include "rdpgfx_common.h" -const char* RDPGFX_CMDID_STRINGS[] = +static const char* RDPGFX_CMDID_STRINGS[] = { "RDPGFX_CMDID_UNUSED_0000", "RDPGFX_CMDID_WIRETOSURFACE_1", @@ -72,20 +72,28 @@ const char* rdpgfx_get_codec_id_string(UINT16 codecId) { case RDPGFX_CODECID_UNCOMPRESSED: return "RDPGFX_CODECID_UNCOMPRESSED"; + case RDPGFX_CODECID_CAVIDEO: return "RDPGFX_CODECID_CAVIDEO"; + case RDPGFX_CODECID_CLEARCODEC: return "RDPGFX_CODECID_CLEARCODEC"; + case RDPGFX_CODECID_PLANAR: return "RDPGFX_CODECID_PLANAR"; + case RDPGFX_CODECID_AVC420: return "RDPGFX_CODECID_AVC420"; + case RDPGFX_CODECID_AVC444: return "RDPGFX_CODECID_AVC444"; + case RDPGFX_CODECID_ALPHA: return "RDPGFX_CODECID_ALPHA"; + case RDPGFX_CODECID_CAPROGRESSIVE: return "RDPGFX_CODECID_CAPROGRESSIVE"; + case RDPGFX_CODECID_CAPROGRESSIVE_V2: return "RDPGFX_CODECID_CAPROGRESSIVE_V2"; } @@ -109,7 +117,6 @@ UINT rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header) Stream_Read_UINT16(s, header->cmdId); /* cmdId (2 bytes) */ Stream_Read_UINT16(s, header->flags); /* flags (2 bytes) */ Stream_Read_UINT32(s, header->pduLength); /* pduLength (4 bytes) */ - return CHANNEL_RC_OK; } @@ -123,7 +130,6 @@ UINT rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header) Stream_Write_UINT16(s, header->cmdId); /* cmdId (2 bytes) */ Stream_Write_UINT16(s, header->flags); /* flags (2 bytes) */ Stream_Write_UINT32(s, header->pduLength); /* pduLength (4 bytes) */ - return CHANNEL_RC_OK; } @@ -142,7 +148,6 @@ UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16) Stream_Read_UINT16(s, pt16->x); /* x (2 bytes) */ Stream_Read_UINT16(s, pt16->y); /* y (2 bytes) */ - return CHANNEL_RC_OK; } @@ -155,7 +160,6 @@ UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16) { Stream_Write_UINT16(s, point16->x); /* x (2 bytes) */ Stream_Write_UINT16(s, point16->y); /* y (2 bytes) */ - return CHANNEL_RC_OK; } @@ -176,7 +180,6 @@ UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16) Stream_Read_UINT16(s, rect16->top); /* top (2 bytes) */ Stream_Read_UINT16(s, rect16->right); /* right (2 bytes) */ Stream_Read_UINT16(s, rect16->bottom); /* bottom (2 bytes) */ - return CHANNEL_RC_OK; } @@ -191,7 +194,6 @@ UINT rdpgfx_write_rect16(wStream* s, RECTANGLE_16* rect16) Stream_Write_UINT16(s, rect16->top); /* top (2 bytes) */ Stream_Write_UINT16(s, rect16->right); /* right (2 bytes) */ Stream_Write_UINT16(s, rect16->bottom); /* bottom (2 bytes) */ - return CHANNEL_RC_OK; } @@ -212,7 +214,6 @@ UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32) Stream_Read_UINT8(s, color32->G); /* G (1 byte) */ Stream_Read_UINT8(s, color32->R); /* R (1 byte) */ Stream_Read_UINT8(s, color32->XA); /* XA (1 byte) */ - return CHANNEL_RC_OK; } @@ -227,6 +228,5 @@ UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32) Stream_Write_UINT8(s, color32->G); /* G (1 byte) */ Stream_Write_UINT8(s, color32->R); /* R (1 byte) */ Stream_Write_UINT8(s, color32->XA); /* XA (1 byte) */ - return CHANNEL_RC_OK; } diff --git a/channels/rdpgfx/rdpgfx_common.h b/channels/rdpgfx/rdpgfx_common.h index 9d082056d..161a1e256 100644 --- a/channels/rdpgfx/rdpgfx_common.h +++ b/channels/rdpgfx/rdpgfx_common.h @@ -26,21 +26,22 @@ #include #include +#include -const char* rdpgfx_get_cmd_id_string(UINT16 cmdId); -const char* rdpgfx_get_codec_id_string(UINT16 codecId); +FREERDP_LOCAL const char* rdpgfx_get_cmd_id_string(UINT16 cmdId); +FREERDP_LOCAL const char* rdpgfx_get_codec_id_string(UINT16 codecId); -UINT rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header); -UINT rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header); +FREERDP_LOCAL UINT rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header); +FREERDP_LOCAL UINT rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header); -UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16); -UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16); +FREERDP_LOCAL UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16); +FREERDP_LOCAL UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16); -UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16); -UINT rdpgfx_write_rect16(wStream* s, RECTANGLE_16* rect16); +FREERDP_LOCAL UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16); +FREERDP_LOCAL UINT rdpgfx_write_rect16(wStream* s, RECTANGLE_16* rect16); -UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32); -UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32); +FREERDP_LOCAL UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32); +FREERDP_LOCAL UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32); #endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_COMMON_H */ diff --git a/channels/rdpgfx/server/rdpgfx_main.c b/channels/rdpgfx/server/rdpgfx_main.c index 4f6452564..1f471d304 100644 --- a/channels/rdpgfx/server/rdpgfx_main.c +++ b/channels/rdpgfx/server/rdpgfx_main.c @@ -345,8 +345,8 @@ static UINT rdpgfx_send_create_surface_pdu(RdpgfxServerContext* context, * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_send_delete_surface_pdu(RdpgfxServerContext* context, - RDPGFX_DELETE_SURFACE_PDU* pdu) +static UINT rdpgfx_send_delete_surface_pdu(RdpgfxServerContext* context, + RDPGFX_DELETE_SURFACE_PDU* pdu) { wStream* s = rdpgfx_server_single_packet_new(RDPGFX_CMDID_DELETESURFACE, 2); @@ -829,8 +829,8 @@ static UINT rdpgfx_send_delete_encoding_context_pdu(RdpgfxServerContext* * * @return 0 on success, otherwise a Win32 error code */ -UINT rdpgfx_send_solid_fill_pdu(RdpgfxServerContext* context, - RDPGFX_SOLID_FILL_PDU* pdu) +static UINT rdpgfx_send_solid_fill_pdu(RdpgfxServerContext* context, + RDPGFX_SOLID_FILL_PDU* pdu) { UINT error = CHANNEL_RC_OK; UINT16 index; @@ -1576,7 +1576,7 @@ void rdpgfx_server_context_free(RdpgfxServerContext* context) free(context); } -FREERDP_API HANDLE rdpgfx_server_get_event_handle(RdpgfxServerContext* context) +HANDLE rdpgfx_server_get_event_handle(RdpgfxServerContext* context) { return context->priv->channelEvent; } diff --git a/scripts/format_code.sh b/scripts/format_code.sh index 99272f021..92ed9b960 100755 --- a/scripts/format_code.sh +++ b/scripts/format_code.sh @@ -31,9 +31,9 @@ if [ $# -le 0 ]; then fi $ASTYLE --lineend=linux --mode=c --indent=tab=4 --pad-header --pad-oper --style=allman --min-conditional-indent=0 \ - --indent-switches --indent-cases --indent-preprocessor -k1 --max-code-length=80 \ + --indent-switches --indent-cases --indent-preprocessor -k1 --max-code-length=100 \ --indent-col1-comments --delete-empty-lines --break-closing-brackets \ - --align-pointer=type --indent-labels -xe \ + --align-pointer=type --indent-labels -xe --break-after-logical \ --unpad-paren --break-blocks $@ exit $? From 97cbc42cd2650a221bfe54757633a1e95d33186b Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 20 Oct 2016 09:59:54 +0200 Subject: [PATCH 4/4] Added reference to capability specifications --- include/freerdp/channels/rdpgfx.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/freerdp/channels/rdpgfx.h b/include/freerdp/channels/rdpgfx.h index 7f737a2f8..c3fc2610b 100644 --- a/include/freerdp/channels/rdpgfx.h +++ b/include/freerdp/channels/rdpgfx.h @@ -86,13 +86,13 @@ struct _RDPGFX_HEADER typedef struct _RDPGFX_HEADER RDPGFX_HEADER; /** - * Capability Sets + * Capability Sets [MS-RDPEGFX] 2.2.3 */ -#define RDPGFX_CAPVERSION_8 0x00080004 -#define RDPGFX_CAPVERSION_81 0x00080105 -#define RDPGFX_CAPVERSION_10 0x000A0002 -#define RDPGFX_CAPVERSION_102 0x000A0200 +#define RDPGFX_CAPVERSION_8 0x00080004 /** [MS-RDPEGFX] 2.2.3.1 */ +#define RDPGFX_CAPVERSION_81 0x00080105 /** [MS-RDPEGFX] 2.2.3.2 */ +#define RDPGFX_CAPVERSION_10 0x000A0002 /** [MS-RDPEGFX] 2.2.3.3 */ +#define RDPGFX_CAPVERSION_102 0x000A0200 /** [MS-RDPEGFX] 2.2.3.4 */ #define RDPGFX_NUMBER_CAPSETS 4 #define RDPGFX_CAPSET_SIZE 12