Merge pull request #310 from llyzs/ostype
libfreerdp-core: move os type settings to the client.
This commit is contained in:
commit
c5a2cf3035
@ -143,6 +143,8 @@ boolean wf_pre_connect(freerdp* instance)
|
||||
|
||||
settings = instance->settings;
|
||||
|
||||
settings->os_major_type = OSMAJORTYPE_WINDOWS;
|
||||
settings->os_minor_type = OSMINORTYPE_WINDOWS_NT;
|
||||
settings->order_support[NEG_DSTBLT_INDEX] = true;
|
||||
settings->order_support[NEG_PATBLT_INDEX] = true;
|
||||
settings->order_support[NEG_SCRBLT_INDEX] = true;
|
||||
|
@ -478,6 +478,8 @@ boolean xf_pre_connect(freerdp* instance)
|
||||
settings = instance->settings;
|
||||
bitmap_cache = settings->bitmap_cache;
|
||||
|
||||
settings->os_major_type = OSMAJORTYPE_UNIX;
|
||||
settings->os_minor_type = OSMINORTYPE_NATIVE_XSERVER;
|
||||
settings->order_support[NEG_DSTBLT_INDEX] = true;
|
||||
settings->order_support[NEG_PATBLT_INDEX] = true;
|
||||
settings->order_support[NEG_SCRBLT_INDEX] = true;
|
||||
|
@ -88,4 +88,26 @@ enum RDP_SVC_CHANNEL_EVENT
|
||||
*/
|
||||
#define CPU_SSE2 0x1
|
||||
|
||||
/**
|
||||
* OSMajorType
|
||||
*/
|
||||
#define OSMAJORTYPE_UNSPECIFIED 0x0000
|
||||
#define OSMAJORTYPE_WINDOWS 0x0001
|
||||
#define OSMAJORTYPE_OS2 0x0002
|
||||
#define OSMAJORTYPE_MACINTOSH 0x0003
|
||||
#define OSMAJORTYPE_UNIX 0x0004
|
||||
|
||||
/**
|
||||
* OSMinorType
|
||||
*/
|
||||
#define OSMINORTYPE_UNSPECIFIED 0x0000
|
||||
#define OSMINORTYPE_WINDOWS_31X 0x0001
|
||||
#define OSMINORTYPE_WINDOWS_95 0x0002
|
||||
#define OSMINORTYPE_WINDOWS_NT 0x0003
|
||||
#define OSMINORTYPE_OS2_V21 0x0004
|
||||
#define OSMINORTYPE_POWER_PC 0x0005
|
||||
#define OSMINORTYPE_MACINTOSH 0x0006
|
||||
#define OSMINORTYPE_NATIVE_XSERVER 0x0007
|
||||
#define OSMINORTYPE_PSEUDO_XSERVER 0x0008
|
||||
|
||||
#endif
|
||||
|
@ -275,6 +275,8 @@ struct rdp_settings
|
||||
TIME_ZONE_INFO client_time_zone;
|
||||
|
||||
/* Capabilities */
|
||||
uint16 os_major_type;
|
||||
uint16 os_minor_type;
|
||||
uint32 vc_chunk_size;
|
||||
boolean sound_beeps;
|
||||
boolean smooth_fonts;
|
||||
|
@ -107,8 +107,16 @@ void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* sett
|
||||
uint8 refreshRectSupport;
|
||||
uint8 suppressOutputSupport;
|
||||
|
||||
stream_seek_uint16(s); /* osMajorType (2 bytes) */
|
||||
stream_seek_uint16(s); /* osMinorType (2 bytes) */
|
||||
if (settings->server_mode)
|
||||
{
|
||||
stream_read_uint16(s, settings->os_major_type); /* osMajorType (2 bytes) */
|
||||
stream_read_uint16(s, settings->os_minor_type); /* osMinorType (2 bytes) */
|
||||
}
|
||||
else
|
||||
{
|
||||
stream_seek_uint16(s); /* osMajorType (2 bytes) */
|
||||
stream_seek_uint16(s); /* osMinorType (2 bytes) */
|
||||
}
|
||||
stream_seek_uint16(s); /* protocolVersion (2 bytes) */
|
||||
stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
|
||||
stream_seek_uint16(s); /* generalCompressionTypes (2 bytes) */
|
||||
@ -158,8 +166,8 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
|
||||
settings->suppress_output = false;
|
||||
}
|
||||
|
||||
stream_write_uint16(s, OSMAJORTYPE_WINDOWS); /* osMajorType (2 bytes) */
|
||||
stream_write_uint16(s, OSMINORTYPE_WINDOWS_NT); /* osMinorType (2 bytes) */
|
||||
stream_write_uint16(s, settings->os_major_type); /* osMajorType (2 bytes) */
|
||||
stream_write_uint16(s, settings->os_minor_type); /* osMinorType (2 bytes) */
|
||||
stream_write_uint16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */
|
||||
stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */
|
||||
stream_write_uint16(s, 0); /* generalCompressionTypes (2 bytes) */
|
||||
|
@ -61,22 +61,6 @@
|
||||
|
||||
#define SOURCE_DESCRIPTOR "MSTSC"
|
||||
|
||||
#define OSMAJORTYPE_UNSPECIFIED 0x0000
|
||||
#define OSMAJORTYPE_WINDOWS 0x0001
|
||||
#define OSMAJORTYPE_OS2 0x0002
|
||||
#define OSMAJORTYPE_MACINTOSH 0x0003
|
||||
#define OSMAJORTYPE_UNIX 0x0004
|
||||
|
||||
#define OSMINORTYPE_UNSPECIFIED 0x0000
|
||||
#define OSMINORTYPE_WINDOWS_31X 0x0001
|
||||
#define OSMINORTYPE_WINDOWS_95 0x0002
|
||||
#define OSMINORTYPE_WINDOWS_NT 0x0003
|
||||
#define OSMINORTYPE_OS2_V21 0x0004
|
||||
#define OSMINORTYPE_POWER_PC 0x0005
|
||||
#define OSMINORTYPE_MACINTOSH 0x0006
|
||||
#define OSMINORTYPE_NATIVE_XSERVER 0x0007
|
||||
#define OSMINORTYPE_PSEUDO_XSERVER 0x0008
|
||||
|
||||
/* Capabilities Protocol Version */
|
||||
#define CAPS_PROTOCOL_VERSION 0x0200
|
||||
|
||||
|
@ -395,7 +395,8 @@ boolean tf_peer_post_connect(freerdp_peer* client)
|
||||
* The server may start sending graphics output and receiving keyboard/mouse input after this
|
||||
* callback returns.
|
||||
*/
|
||||
printf("Client %s is activated", client->hostname);
|
||||
printf("Client %s is activated (osMajorType %d osMinorType %d)", client->hostname,
|
||||
client->settings->os_major_type, client->settings->os_minor_type);
|
||||
if (client->settings->autologon)
|
||||
{
|
||||
printf(" and wants to login automatically as %s\\%s",
|
||||
|
Loading…
Reference in New Issue
Block a user