core: Fix handling of RAIL HandshakeEx flag
When using Enhanced RAIL the HandshakeEx flag must also be set. However
in the current code it was always overwritten by the server flags (which
might lack the flag).
@@ -2423,12 +2423,11 @@ static BOOL rdp_apply_remote_programs_capability_set(rdpSettings* settings, cons
/* 2.2.2.2.3 HandshakeEx PDU (TS_RAIL_ORDER_HANDSHAKE_EX)
* the handshake ex pdu is supported when both, client and server announce
* it OR if we are ready to begin enhanced remoteAPP mode. */
+ UINT32 supportLevel = src->RemoteApplicationSupportLevel;
if (settings->RemoteApplicationMode)
- settings->RemoteApplicationSupportLevel |=
- RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED & settings->RemoteApplicationSupportMask;
+ supportLevel |= RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED;
- settings->RemoteApplicationSupportLevel =
- src->RemoteApplicationSupportLevel & settings->RemoteApplicationSupportMask;
+ settings->RemoteApplicationSupportLevel = supportLevel & settings->RemoteApplicationSupportMask;
return TRUE;
}
