[settings] renamed VirtualChannelCompressionFlags

This commit is contained in:
Armin Novak 2023-11-02 16:44:02 +01:00 committed by akallabeth
parent 37bd7e0959
commit 4d50d59e7e
5 changed files with 21 additions and 23 deletions

View File

@ -600,9 +600,9 @@ struct rdp_settings
UINT64 padding2880[2880 - 2819]; /* 2819 */
/* Virtual Channel Capabilities */
SETTINGS_DEPRECATED(ALIGN64 UINT32 VirtualChannelCompressionFlags); /* 2880 */
SETTINGS_DEPRECATED(ALIGN64 UINT32 VCChunkSize); /* 2881 */
UINT64 padding2944[2944 - 2882]; /* 2882 */
SETTINGS_DEPRECATED(ALIGN64 UINT32 VCFlags); /* 2880 */
SETTINGS_DEPRECATED(ALIGN64 UINT32 VCChunkSize); /* 2881 */
UINT64 padding2944[2944 - 2882]; /* 2882 */
/* Sound Capabilities */
SETTINGS_DEPRECATED(ALIGN64 BOOL SoundBeepsEnabled); /* 2944 */

View File

@ -1940,8 +1940,8 @@ UINT32 freerdp_settings_get_uint32(const rdpSettings* settings, FreeRDP_Settings
case FreeRDP_VCChunkSize:
return settings->VCChunkSize;
case FreeRDP_VirtualChannelCompressionFlags:
return settings->VirtualChannelCompressionFlags;
case FreeRDP_VCFlags:
return settings->VCFlags;
default:
WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
@ -2455,8 +2455,8 @@ BOOL freerdp_settings_set_uint32(rdpSettings* settings, FreeRDP_Settings_Keys_UI
settings->VCChunkSize = cnv.c;
break;
case FreeRDP_VirtualChannelCompressionFlags:
settings->VirtualChannelCompressionFlags = cnv.c;
case FreeRDP_VCFlags:
settings->VCFlags = cnv.c;
break;
default:

View File

@ -430,8 +430,7 @@ static const struct settings_str_entry settings_map[] = {
{ FreeRDP_ThreadingFlags, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_ThreadingFlags" },
{ FreeRDP_TlsSecLevel, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_TlsSecLevel" },
{ FreeRDP_VCChunkSize, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_VCChunkSize" },
{ FreeRDP_VirtualChannelCompressionFlags, FREERDP_SETTINGS_TYPE_UINT32,
"FreeRDP_VirtualChannelCompressionFlags" },
{ FreeRDP_VCFlags, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_VCFlags" },
{ FreeRDP_XPan, FREERDP_SETTINGS_TYPE_INT32, "FreeRDP_XPan" },
{ FreeRDP_YPan, FREERDP_SETTINGS_TYPE_INT32, "FreeRDP_YPan" },
{ FreeRDP_ParentWindowId, FREERDP_SETTINGS_TYPE_UINT64, "FreeRDP_ParentWindowId" },

View File

@ -2103,17 +2103,17 @@ static BOOL rdp_apply_virtual_channel_capability_set(rdpSettings* settings, cons
WINPR_ASSERT(src);
/* MS servers and clients disregard in advertising what is relevant for their own side */
if (settings->ServerMode && (settings->VirtualChannelCompressionFlags & VCCAPS_COMPR_SC) &&
(src->VirtualChannelCompressionFlags & VCCAPS_COMPR_SC))
settings->VirtualChannelCompressionFlags |= VCCAPS_COMPR_SC;
if (settings->ServerMode && (settings->VCFlags & VCCAPS_COMPR_SC) &&
(src->VCFlags & VCCAPS_COMPR_SC))
settings->VCFlags |= VCCAPS_COMPR_SC;
else
settings->VirtualChannelCompressionFlags &= ~VCCAPS_COMPR_SC;
settings->VCFlags &= ~VCCAPS_COMPR_SC;
if (!settings->ServerMode && (settings->VirtualChannelCompressionFlags & VCCAPS_COMPR_CS_8K) &&
(src->VirtualChannelCompressionFlags & VCCAPS_COMPR_CS_8K))
settings->VirtualChannelCompressionFlags |= VCCAPS_COMPR_CS_8K;
if (!settings->ServerMode && (settings->VCFlags & VCCAPS_COMPR_CS_8K) &&
(src->VCFlags & VCCAPS_COMPR_CS_8K))
settings->VCFlags |= VCCAPS_COMPR_CS_8K;
else
settings->VirtualChannelCompressionFlags &= ~VCCAPS_COMPR_CS_8K;
settings->VCFlags &= ~VCCAPS_COMPR_CS_8K;
/*
* When one peer does not write the VCChunkSize, the VCChunkSize must not be
@ -2122,8 +2122,7 @@ static BOOL rdp_apply_virtual_channel_capability_set(rdpSettings* settings, cons
*/
if (!settings->ServerMode)
{
if ((src->VCChunkSize > CHANNEL_CHUNK_MAX_LENGTH) ||
(src->VCChunkSize == 0))
if ((src->VCChunkSize > CHANNEL_CHUNK_MAX_LENGTH) || (src->VCChunkSize == 0))
settings->VCChunkSize = CHANNEL_CHUNK_LENGTH;
else
{
@ -2155,7 +2154,7 @@ static BOOL rdp_read_virtual_channel_capability_set(wStream* s, rdpSettings* set
else
VCChunkSize = UINT32_MAX; /* Use an invalid value to determine that value is not present */
settings->VirtualChannelCompressionFlags = flags;
settings->VCFlags = flags;
settings->VCChunkSize = VCChunkSize;
return TRUE;
@ -2173,8 +2172,8 @@ static BOOL rdp_write_virtual_channel_capability_set(wStream* s, const rdpSettin
return FALSE;
const size_t header = rdp_capability_set_start(s);
Stream_Write_UINT32(s, settings->VirtualChannelCompressionFlags); /* flags (4 bytes) */
Stream_Write_UINT32(s, settings->VCChunkSize); /* VCChunkSize (4 bytes) */
Stream_Write_UINT32(s, settings->VCFlags); /* flags (4 bytes) */
Stream_Write_UINT32(s, settings->VCChunkSize); /* VCChunkSize (4 bytes) */
return rdp_capability_set_finish(s, header, CAPSET_TYPE_VIRTUAL_CHANNEL);
}

View File

@ -333,7 +333,7 @@ static const size_t uint32_list_indices[] = {
FreeRDP_ThreadingFlags,
FreeRDP_TlsSecLevel,
FreeRDP_VCChunkSize,
FreeRDP_VirtualChannelCompressionFlags,
FreeRDP_VCFlags,
};
#define have_int32_list_indices