Use hex constants for data pdu (pdutype2) enumeration

This matches how they're described in MS-RDPBCGR. Also add the proper
constant name as comments.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
This commit is contained in:
Cendio 2018-01-18 13:56:30 +01:00
parent 37da672908
commit 293680c034
2 changed files with 13 additions and 13 deletions

View File

@ -206,18 +206,18 @@ enum RDP_PDU_TYPE
enum RDP_DATA_PDU_TYPE
{
RDP_DATA_PDU_UPDATE = 2,
RDP_DATA_PDU_CONTROL = 20,
RDP_DATA_PDU_POINTER = 27,
RDP_DATA_PDU_INPUT = 28,
RDP_DATA_PDU_SYNCHRONISE = 31,
RDP_DATA_PDU_BELL = 34,
RDP_DATA_PDU_CLIENT_WINDOW_STATUS = 35,
RDP_DATA_PDU_LOGON = 38, /* PDUTYPE2_SAVE_SESSION_INFO */
RDP_DATA_PDU_FONT2 = 39,
RDP_DATA_PDU_KEYBOARD_INDICATORS = 41,
RDP_DATA_PDU_DISCONNECT = 47,
RDP_DATA_PDU_AUTORECONNECT_STATUS = 50
RDP_DATA_PDU_UPDATE = 0x02, /* PDUTYPE2_UPDATE */
RDP_DATA_PDU_CONTROL = 0x14, /* PDUTYPE2_CONTROL */
RDP_DATA_PDU_POINTER = 0x1b, /* PDUTYPE2_POINTER */
RDP_DATA_PDU_INPUT = 0x1c, /* PDUTYPE2_INPUT */
RDP_DATA_PDU_SYNCHRONISE = 0x1f, /* PDUTYPE2_SYNCHRONIZE */
RDP_DATA_PDU_BELL = 0x22, /* PDUTYPE2_PLAY_SOUND */
RDP_DATA_PDU_CLIENT_WINDOW_STATUS = 0x23, /* PDUTYPE2_SUPRESS_OUTPUT */
RDP_DATA_PDU_LOGON = 0x26, /* PDUTYPE2_SAVE_SESSION_INFO */
RDP_DATA_PDU_FONT2 = 0x27, /* PDUTYPE2_FONTLIST */
RDP_DATA_PDU_KEYBOARD_INDICATORS = 0x29, /* PDUTYPE2_SET_KEYBOARD_INDICATORS */
RDP_DATA_PDU_SET_ERROR_INFO = 0x2f, /* PDUTYPE2_SET_ERROR_INFO */
RDP_DATA_PDU_AUTORECONNECT_STATUS = 0x32, /* PDUTYPE2_ARC_STATUS_PDU */
};
enum RDP_SAVE_SESSION_PDU_TYPE

2
rdp.c
View File

@ -1593,7 +1593,7 @@ process_data_pdu(STREAM s, uint32 * ext_disc_reason)
process_pdu_logon(s);
break;
case RDP_DATA_PDU_DISCONNECT:
case RDP_DATA_PDU_SET_ERROR_INFO:
process_ts_set_error_info_pdu(s, ext_disc_reason);
/* We used to return true and disconnect immediately here, but