mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: more GCC and MCS fixes
This commit is contained in:
parent
38b125f336
commit
1c0e874b5b
|
@ -58,7 +58,8 @@
|
|||
#define SC_CORE 0x0C01
|
||||
#define SC_SECURITY 0x0C02
|
||||
#define SC_NET 0x0C03
|
||||
#define SC_MULTITRANSPORT 0x0C06
|
||||
#define SC_MCS_MSGCHANNEL 0x0C04
|
||||
#define SC_MULTITRANSPORT 0x0C08
|
||||
|
||||
/* RDP version */
|
||||
#define RDP_VERSION_4 0x00080001
|
||||
|
|
|
@ -485,9 +485,13 @@ BOOL gcc_read_server_data_blocks(wStream* s, rdpSettings* settings, int length)
|
|||
|
||||
void gcc_write_server_data_blocks(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
gcc_write_server_core_data(s, settings);
|
||||
gcc_write_server_network_data(s, settings);
|
||||
gcc_write_server_security_data(s, settings);
|
||||
gcc_write_server_core_data(s, settings); /* serverCoreData */
|
||||
gcc_write_server_network_data(s, settings); /* serverNetworkData */
|
||||
gcc_write_server_security_data(s, settings); /* serverSecurityData */
|
||||
|
||||
/* TODO: Send these GCC data blocks only when the client sent them */
|
||||
//gcc_write_server_message_channel_data(s, settings); /* serverMessageChannelData */
|
||||
//gcc_write_server_multitransport_channel_data(s, settings); /* serverMultitransportChannelData */
|
||||
}
|
||||
|
||||
BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length)
|
||||
|
@ -961,6 +965,24 @@ BOOL gcc_read_server_security_data(wStream* s, rdpSettings* settings)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void gcc_write_server_message_channel_data(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
UINT16 mcsChannelId = 0;
|
||||
|
||||
gcc_write_user_data_header(s, SC_MCS_MSGCHANNEL, 6);
|
||||
|
||||
Stream_Write_UINT16(s, mcsChannelId); /* mcsChannelId (2 bytes) */
|
||||
}
|
||||
|
||||
void gcc_write_server_multitransport_channel_data(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
UINT32 flags = 0;
|
||||
|
||||
gcc_write_user_data_header(s, SC_MULTITRANSPORT, 8);
|
||||
|
||||
Stream_Write_UINT32(s, flags); /* flags (4 bytes) */
|
||||
}
|
||||
|
||||
static const BYTE initial_signature[] =
|
||||
{
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
|
|
|
@ -59,7 +59,9 @@ BOOL gcc_read_client_monitor_extended_data(wStream* s, rdpSettings* settings, UI
|
|||
void gcc_write_client_monitor_extended_data(wStream* s, rdpSettings* settings);
|
||||
BOOL gcc_read_client_message_channel_data(wStream* s, rdpSettings* settings, UINT16 blockLength);
|
||||
void gcc_write_client_message_channel_data(wStream* s, rdpSettings* settings);
|
||||
void gcc_write_server_message_channel_data(wStream* s, rdpSettings* settings);
|
||||
BOOL gcc_read_client_multitransport_channel_data(wStream* s, rdpSettings* settings, UINT16 blockLength);
|
||||
void gcc_write_client_multitransport_channel_data(wStream* s, rdpSettings* settings);
|
||||
void gcc_write_server_multitransport_channel_data(wStream* s, rdpSettings* settings);
|
||||
|
||||
#endif /* FREERDP_CORE_GCC_H */
|
||||
|
|
|
@ -584,11 +584,22 @@ BOOL mcs_send_connect_response(rdpMcs* mcs)
|
|||
BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, wStream* s)
|
||||
{
|
||||
UINT16 length;
|
||||
UINT32 subHeight;
|
||||
UINT32 subInterval;
|
||||
enum DomainMCSPDU MCSPDU;
|
||||
|
||||
MCSPDU = DomainMCSPDU_ErectDomainRequest;
|
||||
|
||||
return mcs_read_domain_mcspdu_header(s, &MCSPDU, &length);
|
||||
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
|
||||
return FALSE;
|
||||
|
||||
if (!per_read_integer(s, &subHeight)) /* subHeight (INTEGER) */
|
||||
return FALSE;
|
||||
|
||||
if (!per_read_integer(s, &subInterval)) /* subInterval (INTEGER) */
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue