diff --git a/include/freerdp/settings_types_private.h b/include/freerdp/settings_types_private.h index bc31107fc..09c59f420 100644 --- a/include/freerdp/settings_types_private.h +++ b/include/freerdp/settings_types_private.h @@ -601,7 +601,7 @@ struct rdp_settings /* Virtual Channel Capabilities */ SETTINGS_DEPRECATED(ALIGN64 UINT32 VirtualChannelCompressionFlags); /* 2880 */ - SETTINGS_DEPRECATED(ALIGN64 UINT32 VirtualChannelChunkSize); /* 2881 */ + SETTINGS_DEPRECATED(ALIGN64 UINT32 VCChunkSize); /* 2881 */ UINT64 padding2944[2944 - 2882]; /* 2882 */ /* Sound Capabilities */ diff --git a/libfreerdp/common/settings_getters.c b/libfreerdp/common/settings_getters.c index 312db4fc3..53348259b 100644 --- a/libfreerdp/common/settings_getters.c +++ b/libfreerdp/common/settings_getters.c @@ -1937,8 +1937,8 @@ UINT32 freerdp_settings_get_uint32(const rdpSettings* settings, FreeRDP_Settings case FreeRDP_TlsSecLevel: return settings->TlsSecLevel; - case FreeRDP_VirtualChannelChunkSize: - return settings->VirtualChannelChunkSize; + case FreeRDP_VCChunkSize: + return settings->VCChunkSize; case FreeRDP_VirtualChannelCompressionFlags: return settings->VirtualChannelCompressionFlags; @@ -2451,8 +2451,8 @@ BOOL freerdp_settings_set_uint32(rdpSettings* settings, FreeRDP_Settings_Keys_UI settings->TlsSecLevel = cnv.c; break; - case FreeRDP_VirtualChannelChunkSize: - settings->VirtualChannelChunkSize = cnv.c; + case FreeRDP_VCChunkSize: + settings->VCChunkSize = cnv.c; break; case FreeRDP_VirtualChannelCompressionFlags: diff --git a/libfreerdp/common/settings_str.h b/libfreerdp/common/settings_str.h index 7ef4a3b23..6456b745e 100644 --- a/libfreerdp/common/settings_str.h +++ b/libfreerdp/common/settings_str.h @@ -429,8 +429,7 @@ static const struct settings_str_entry settings_map[] = { { FreeRDP_TcpKeepAliveRetries, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_TcpKeepAliveRetries" }, { FreeRDP_ThreadingFlags, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_ThreadingFlags" }, { FreeRDP_TlsSecLevel, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_TlsSecLevel" }, - { FreeRDP_VirtualChannelChunkSize, FREERDP_SETTINGS_TYPE_UINT32, - "FreeRDP_VirtualChannelChunkSize" }, + { FreeRDP_VCChunkSize, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_VCChunkSize" }, { FreeRDP_VirtualChannelCompressionFlags, FREERDP_SETTINGS_TYPE_UINT32, "FreeRDP_VirtualChannelCompressionFlags" }, { FreeRDP_XPan, FREERDP_SETTINGS_TYPE_INT32, "FreeRDP_XPan" }, diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 97fbbe187..6ee6880b4 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -2122,12 +2122,12 @@ static BOOL rdp_apply_virtual_channel_capability_set(rdpSettings* settings, cons */ if (!settings->ServerMode) { - if ((src->VirtualChannelChunkSize > CHANNEL_CHUNK_MAX_LENGTH) || - (src->VirtualChannelChunkSize == 0)) - settings->VirtualChannelChunkSize = CHANNEL_CHUNK_LENGTH; + if ((src->VCChunkSize > CHANNEL_CHUNK_MAX_LENGTH) || + (src->VCChunkSize == 0)) + settings->VCChunkSize = CHANNEL_CHUNK_LENGTH; else { - settings->VirtualChannelChunkSize = src->VirtualChannelChunkSize; + settings->VCChunkSize = src->VCChunkSize; } } @@ -2156,7 +2156,7 @@ static BOOL rdp_read_virtual_channel_capability_set(wStream* s, rdpSettings* set VCChunkSize = UINT32_MAX; /* Use an invalid value to determine that value is not present */ settings->VirtualChannelCompressionFlags = flags; - settings->VirtualChannelChunkSize = VCChunkSize; + settings->VCChunkSize = VCChunkSize; return TRUE; } @@ -2174,7 +2174,7 @@ static BOOL rdp_write_virtual_channel_capability_set(wStream* s, const rdpSettin const size_t header = rdp_capability_set_start(s); Stream_Write_UINT32(s, settings->VirtualChannelCompressionFlags); /* flags (4 bytes) */ - Stream_Write_UINT32(s, settings->VirtualChannelChunkSize); /* VCChunkSize (4 bytes) */ + Stream_Write_UINT32(s, settings->VCChunkSize); /* VCChunkSize (4 bytes) */ return rdp_capability_set_finish(s, header, CAPSET_TYPE_VIRTUAL_CHANNEL); } diff --git a/libfreerdp/core/channels.c b/libfreerdp/core/channels.c index f025b5ac2..c2d8db9c1 100644 --- a/libfreerdp/core/channels.c +++ b/libfreerdp/core/channels.c @@ -85,9 +85,9 @@ BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channelId, const BYTE* data, size_ while (left > 0) { - if (left > rdp->settings->VirtualChannelChunkSize) + if (left > rdp->settings->VCChunkSize) { - chunkSize = rdp->settings->VirtualChannelChunkSize; + chunkSize = rdp->settings->VCChunkSize; } else { diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index 4923f6bd0..2c982024a 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -155,7 +155,7 @@ static int freerdp_peer_virtual_channel_write(freerdp_peer* client, HANDLE hChan if (peerChannel->channelFlags & WTS_CHANNEL_OPTION_DYNAMIC) return -1; /* not yet supported */ - maxChunkSize = rdp->settings->VirtualChannelChunkSize; + maxChunkSize = rdp->settings->VCChunkSize; totalLength = length; flags = CHANNEL_FLAG_FIRST; @@ -168,7 +168,7 @@ static int freerdp_peer_virtual_channel_write(freerdp_peer* client, HANDLE hChan if (length > maxChunkSize) { - chunkSize = rdp->settings->VirtualChannelChunkSize; + chunkSize = rdp->settings->VCChunkSize; } else { diff --git a/libfreerdp/core/server.c b/libfreerdp/core/server.c index 5e02d90d5..c4fe36deb 100644 --- a/libfreerdp/core/server.c +++ b/libfreerdp/core/server.c @@ -1340,10 +1340,10 @@ HANDLE WINAPI FreeRDP_WTSVirtualChannelOpen(HANDLE hServer, DWORD SessionId, LPS if (!channel) { - const UINT32 VirtualChannelChunkSize = - freerdp_settings_get_uint32(context->settings, FreeRDP_VirtualChannelChunkSize); + const UINT32 VCChunkSize = + freerdp_settings_get_uint32(context->settings, FreeRDP_VCChunkSize); channel = channel_new(vcm, client, joined_channel->ChannelId, index, - RDP_PEER_CHANNEL_TYPE_SVC, VirtualChannelChunkSize, pVirtualName); + RDP_PEER_CHANNEL_TYPE_SVC, VCChunkSize, pVirtualName); if (!channel) goto fail; @@ -1414,10 +1414,9 @@ HANDLE WINAPI FreeRDP_WTSVirtualChannelOpenEx(DWORD SessionId, LPSTR pVirtualNam WINPR_ASSERT(client->context); WINPR_ASSERT(client->context->settings); - const UINT32 VirtualChannelChunkSize = - freerdp_settings_get_uint32(client->context->settings, FreeRDP_VirtualChannelChunkSize); - channel = channel_new(vcm, client, 0, 0, RDP_PEER_CHANNEL_TYPE_DVC, VirtualChannelChunkSize, - pVirtualName); + const UINT32 VCChunkSize = + freerdp_settings_get_uint32(client->context->settings, FreeRDP_VCChunkSize); + channel = channel_new(vcm, client, 0, 0, RDP_PEER_CHANNEL_TYPE_DVC, VCChunkSize, pVirtualName); if (!channel) { diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index f5379581f..09bfb5d3b 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -633,7 +633,7 @@ rdpSettings* freerdp_settings_new(DWORD flags) WINDOW_LEVEL_SUPPORTED | WINDOW_LEVEL_SUPPORTED_EX) || !freerdp_settings_set_uint32(settings, FreeRDP_RemoteAppNumIconCaches, 3) || !freerdp_settings_set_uint32(settings, FreeRDP_RemoteAppNumIconCacheEntries, 12) || - !freerdp_settings_set_uint32(settings, FreeRDP_VirtualChannelChunkSize, + !freerdp_settings_set_uint32(settings, FreeRDP_VCChunkSize, (server && !remote) ? CHANNEL_CHUNK_MAX_LENGTH : CHANNEL_CHUNK_LENGTH) || /* [MS-RDPBCGR] 2.2.7.2.7 Large Pointer Capability Set (TS_LARGE_POINTER_CAPABILITYSET) diff --git a/libfreerdp/core/test/settings_property_lists.h b/libfreerdp/core/test/settings_property_lists.h index b1789a8db..1eacc4370 100644 --- a/libfreerdp/core/test/settings_property_lists.h +++ b/libfreerdp/core/test/settings_property_lists.h @@ -332,7 +332,7 @@ static const size_t uint32_list_indices[] = { FreeRDP_TcpKeepAliveRetries, FreeRDP_ThreadingFlags, FreeRDP_TlsSecLevel, - FreeRDP_VirtualChannelChunkSize, + FreeRDP_VCChunkSize, FreeRDP_VirtualChannelCompressionFlags, };