Improve handling/code of Set Error Info PDU
Renamed to function to match the PDU it was processing. Removed the function from proto.h and made it static - there's nothing calling this from outside of rdp.c. Fixed the logging output to output the error code instead of the pointer value.
This commit is contained in:
parent
ca5c0adefd
commit
2f6cd4df7e
1
proto.h
1
proto.h
@ -158,7 +158,6 @@ void process_system_pointer_pdu(STREAM s);
|
||||
void set_system_pointer(uint32 ptr);
|
||||
void process_bitmap_updates(STREAM s);
|
||||
void process_palette(STREAM s);
|
||||
void process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason);
|
||||
void rdp_main_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
|
||||
RD_BOOL rdp_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
|
||||
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command,
|
||||
|
10
rdp.c
10
rdp.c
@ -1512,13 +1512,13 @@ process_pdu_logon(STREAM s)
|
||||
}
|
||||
|
||||
|
||||
/* Process a disconnect PDU */
|
||||
void
|
||||
process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason)
|
||||
/* Process a Set Error Info PDU */
|
||||
static void
|
||||
process_ts_set_error_info_pdu(STREAM s, uint32 * ext_disc_reason)
|
||||
{
|
||||
in_uint32_le(s, *ext_disc_reason);
|
||||
|
||||
logger(Protocol, Debug, "process_disconnect_pdu(), reason = %d", ext_disc_reason);
|
||||
logger(Protocol, Debug, "process_ts_set_error_info_pdu(), error info = %d", *ext_disc_reason);
|
||||
}
|
||||
|
||||
/* Process data PDU */
|
||||
@ -1594,7 +1594,7 @@ process_data_pdu(STREAM s, uint32 * ext_disc_reason)
|
||||
break;
|
||||
|
||||
case RDP_DATA_PDU_DISCONNECT:
|
||||
process_disconnect_pdu(s, ext_disc_reason);
|
||||
process_ts_set_error_info_pdu(s, ext_disc_reason);
|
||||
|
||||
/* We used to return true and disconnect immediately here, but
|
||||
* Windows Vista sends a disconnect PDU with reason 0 when
|
||||
|
Loading…
Reference in New Issue
Block a user