[client,common] working REDIRECTION_VERSION6

* REDIRECTION_VERSION6 requires enabled multitransport, enable it
* Add a fallback if multitransport was disabled
This commit is contained in:
akallabeth 2023-02-20 13:26:44 +01:00 committed by akallabeth
parent 1bec63c2f2
commit ab5be61e89
3 changed files with 19 additions and 3 deletions

View File

@ -311,7 +311,7 @@ static const COMMAND_LINE_ARGUMENT_A global_cmd_args[] = {
"Use multiple monitors" },
{ "multitouch", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL,
"Redirect multitouch input" },
{ "multitransport", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL,
{ "multitransport", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL,
"Support multitransport protocol" },
{ "nego", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL,
"protocol security negotiation" },

View File

@ -2071,6 +2071,16 @@ BOOL gcc_write_client_cluster_data(wStream* s, const rdpMcs* mcs)
if (settings->RedirectSmartCards && settings->SmartcardLogon)
flags |= REDIRECTED_SMARTCARD;
if (flags & REDIRECTION_SUPPORTED)
{
/* REDIRECTION_VERSION6 requires multitransport enabled.
* if we run without that use REDIRECTION_VERSION5 */
if (freerdp_settings_get_bool(settings, FreeRDP_SupportMultitransport))
flags |= (REDIRECTION_VERSION6 << 4);
else
flags |= (REDIRECTION_VERSION5 << 4);
}
WLog_VRB(TAG, "write ClusterInfoFlags=%s, RedirectedSessionId=0x%08" PRIx32,
rdp_cluster_info_flags_to_string(flags, buffer, sizeof(buffer)),
settings->RedirectedSessionId);

View File

@ -375,8 +375,7 @@ rdpSettings* freerdp_settings_new(DWORD flags)
!freerdp_settings_set_bool(settings, FreeRDP_ServerMode,
(flags & FREERDP_SETTINGS_SERVER_MODE) ? TRUE : FALSE) ||
!freerdp_settings_set_bool(settings, FreeRDP_WaitForOutputBufferFlush, TRUE) ||
!freerdp_settings_set_uint32(settings, FreeRDP_ClusterInfoFlags,
REDIRECTION_SUPPORTED | (REDIRECTION_VERSION5 << 2)) ||
!freerdp_settings_set_uint32(settings, FreeRDP_ClusterInfoFlags, REDIRECTION_SUPPORTED) ||
!freerdp_settings_set_uint32(settings, FreeRDP_DesktopWidth, 1024) ||
!freerdp_settings_set_uint32(settings, FreeRDP_DesktopHeight, 768) ||
!freerdp_settings_set_bool(settings, FreeRDP_Workarea, FALSE) ||
@ -460,6 +459,13 @@ rdpSettings* freerdp_settings_new(DWORD flags)
if (!freerdp_settings_set_pointer_len(settings, FreeRDP_MonitorIds, NULL, 0))
goto out_fail;
if (!freerdp_settings_set_uint32(settings, FreeRDP_MultitransportFlags,
(TRANSPORT_TYPE_UDP_FECR | TRANSPORT_TYPE_UDP_FECL |
TRANSPORT_TYPE_UDP_PREFERRED | SOFTSYNC_TCP_TO_UDP)))
goto out_fail;
if (!freerdp_settings_set_bool(settings, FreeRDP_SupportMultitransport, TRUE))
goto out_fail;
if (!settings_get_computer_name(settings))
goto out_fail;