shadow: disable RemoteFX if connection type is not LAN

This commit is contained in:
Marc-André Moreau 2014-09-23 18:19:05 -04:00
parent 7574788ba5
commit af858e8f2a
2 changed files with 12 additions and 1 deletions

View File

@ -558,6 +558,7 @@ BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
{ {
char* str = NULL; char* str = NULL;
UINT32 version; UINT32 version;
BYTE connectionType = 0;
UINT32 clientColorDepth; UINT32 clientColorDepth;
UINT16 colorDepth = 0; UINT16 colorDepth = 0;
UINT16 postBeta2ColorDepth = 0; UINT16 postBeta2ColorDepth = 0;
@ -653,7 +654,7 @@ BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
if (blockLength < 1) if (blockLength < 1)
break; break;
Stream_Read_UINT8(s, settings->PerformanceFlags); /* connectionType (1 byte) */ Stream_Read_UINT8(s, connectionType); /* connectionType (1 byte) */
blockLength -= 1; blockLength -= 1;
if (blockLength < 1) if (blockLength < 1)
@ -759,6 +760,11 @@ BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
if (settings->SupportDynamicTimeZone) if (settings->SupportDynamicTimeZone)
settings->SupportDynamicTimeZone = (earlyCapabilityFlags & RNS_UD_CS_SUPPORT_DYNAMIC_TIME_ZONE) ? TRUE : FALSE; settings->SupportDynamicTimeZone = (earlyCapabilityFlags & RNS_UD_CS_SUPPORT_DYNAMIC_TIME_ZONE) ? TRUE : FALSE;
if (!(earlyCapabilityFlags & RNS_UD_CS_VALID_CONNECTION_TYPE))
connectionType = 0;
settings->ConnectionType = connectionType;
return TRUE; return TRUE;
} }

View File

@ -166,6 +166,11 @@ BOOL shadow_client_post_connect(freerdp_peer* peer)
settings->RemoteFxCodec = FALSE; settings->RemoteFxCodec = FALSE;
} }
if (settings->ConnectionType != CONNECTION_TYPE_LAN)
{
settings->RemoteFxCodec = FALSE;
}
WLog_ERR(TAG, "Client from %s is activated (%dx%d@%d)", WLog_ERR(TAG, "Client from %s is activated (%dx%d@%d)",
peer->hostname, settings->DesktopWidth, settings->DesktopHeight, settings->ColorDepth); peer->hostname, settings->DesktopWidth, settings->DesktopHeight, settings->ColorDepth);