Fixed mixing of remote application mode requested and feature mask.

This commit is contained in:
Armin Novak 2019-02-20 08:45:36 +01:00
parent aacf5bddc4
commit 0560ba0910
2 changed files with 19 additions and 7 deletions

View File

@ -756,6 +756,7 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
#define FreeRDP_RemoteAppNumIconCacheEntries (2123)
#define FreeRDP_RemoteAppLanguageBarSupported (2124)
#define FreeRDP_RemoteWndSupportLevel (2125)
#define FreeRDP_RemoteApplicationSupportLevel (2126)
#define FreeRDP_ReceivedCapabilities (2240)
#define FreeRDP_ReceivedCapabilitiesSize (2241)
#define FreeRDP_OsMajorType (2304)
@ -1239,7 +1240,7 @@ struct rdp_settings
*/
/* RemoteApp */
ALIGN64 UINT32 RemoteApplicationMode; /* 2112 */
ALIGN64 BOOL RemoteApplicationMode; /* 2112 */
ALIGN64 char* RemoteApplicationName; /* 2113 */
ALIGN64 char* RemoteApplicationIcon; /* 2114 */
ALIGN64 char* RemoteApplicationProgram; /* 2115 */
@ -1253,7 +1254,8 @@ struct rdp_settings
ALIGN64 UINT32 RemoteAppNumIconCacheEntries; /* 2123 */
ALIGN64 BOOL RemoteAppLanguageBarSupported; /* 2124 */
ALIGN64 UINT32 RemoteWndSupportLevel; /* 2125 */
UINT64 padding2176[2176 - 2126]; /* 2126 */
ALIGN64 UINT32 RemoteApplicationSupportLevel; /* 2126 */
UINT64 padding2176[2176 - 2127]; /* 2127 */
UINT64 padding2240[2240 - 2176]; /* 2176 */
/**

View File

@ -2183,7 +2183,17 @@ static BOOL rdp_read_remote_programs_capability_set(wStream* s, UINT16 length,
return FALSE;
Stream_Read_UINT32(s, railSupportLevel); /* railSupportLevel (4 bytes) */
settings->RemoteApplicationMode = railSupportLevel;
settings->RemoteApplicationSupportLevel = railSupportLevel;
if ((railSupportLevel & RAIL_LEVEL_SUPPORTED) == 0)
{
if (settings->RemoteApplicationMode == TRUE)
{
/* RemoteApp Failure! */
settings->RemoteApplicationMode = FALSE;
}
}
return TRUE;
}
@ -2206,13 +2216,13 @@ static BOOL rdp_write_remote_programs_capability_set(wStream* s,
header = rdp_capability_set_start(s);
railSupportLevel = RAIL_LEVEL_SUPPORTED;
if (settings->RemoteApplicationMode & RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED)
if (settings->RemoteApplicationSupportLevel & RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED)
{
if (settings->RemoteAppLanguageBarSupported)
railSupportLevel |= RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED;
}
if (settings->RemoteApplicationMode & RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED)
if (settings->RemoteApplicationSupportLevel & RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED)
railSupportLevel |= RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED;
Stream_Write_UINT32(s, railSupportLevel); /* railSupportLevel (4 bytes) */
@ -3941,7 +3951,7 @@ BOOL rdp_write_demand_active(wStream* s, rdpSettings* settings)
return FALSE;
}
if (settings->RemoteApplicationMode & RAIL_LEVEL_SUPPORTED)
if (settings->RemoteApplicationMode)
{
numberCapabilities += 2;
@ -4125,7 +4135,7 @@ BOOL rdp_write_confirm_active(wStream* s, rdpSettings* settings)
}
}
if (settings->RemoteApplicationMode & RAIL_LEVEL_SUPPORTED)
if (settings->RemoteApplicationMode)
{
numberCapabilities += 2;