From 52736240898af872539f7c5f6de74f924aa86087 Mon Sep 17 00:00:00 2001 From: Nexarian Date: Tue, 14 Mar 2023 01:53:22 -0400 Subject: [PATCH] Fixing some comments --- common/ms-rdpbcgr.h | 8 ++++---- common/ms-rdpedisp.h | 3 +++ libxrdp/libxrdp.c | 13 +++++++++++++ xrdp/xrdp_egfx.c | 12 +++++------- xup/xup.c | 2 ++ 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/common/ms-rdpbcgr.h b/common/ms-rdpbcgr.h index 4e5a5e4a..0cbe03a7 100644 --- a/common/ms-rdpbcgr.h +++ b/common/ms-rdpbcgr.h @@ -95,10 +95,10 @@ /* the maximum height of the virtual desktop resulting from the union of the monitors */ /* contained in the monitorDefArray field MUST NOT exceed 32,766 pixels. */ /* The minimum permitted size of the virtual desktop is 200 x 200 pixels. */ -#define CLIENT_MONITOR_DATA_MINIMUM_VIRTUAL_DESKTOP_WIDTH 0xC8 -#define CLIENT_MONITOR_DATA_MINIMUM_VIRTUAL_DESKTOP_HEIGHT 0xC8 -#define CLIENT_MONITOR_DATA_MAXIMUM_VIRTUAL_DESKTOP_WIDTH 0x7FFE -#define CLIENT_MONITOR_DATA_MAXIMUM_VIRTUAL_DESKTOP_HEIGHT 0x7FFE +#define CLIENT_MONITOR_DATA_MINIMUM_VIRTUAL_DESKTOP_WIDTH 0xC8 // 200 +#define CLIENT_MONITOR_DATA_MINIMUM_VIRTUAL_DESKTOP_HEIGHT 0xC8 // 200 +#define CLIENT_MONITOR_DATA_MAXIMUM_VIRTUAL_DESKTOP_WIDTH 0x7FFE // 32766 +#define CLIENT_MONITOR_DATA_MAXIMUM_VIRTUAL_DESKTOP_HEIGHT 0x7FFE // 32766 /* 2.2.1.3.6.1 Monitor Definition (TS_MONITOR_DEF) */ #define TS_MONITOR_PRIMARY 0x00000001 diff --git a/common/ms-rdpedisp.h b/common/ms-rdpedisp.h index 2e45b945..e6b9e448 100644 --- a/common/ms-rdpedisp.h +++ b/common/ms-rdpedisp.h @@ -38,4 +38,7 @@ #define ORIENTATION_LANDSCAPE_FLIPPED 180 #define ORIENTATION_PORTRAIT_FLIPPED 270 +/* Display Control Monitor Layout (2.2.2.2.1) */ +#define DISPLAYCONTROL_MONITOR_PRIMARY 0x00000001 + #endif /* MS_RDPEDISP_H */ diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index 08efb4ad..e84dcdb6 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -1137,6 +1137,7 @@ int EXPORT_CC libxrdp_reset(struct xrdp_session *session, unsigned int width, unsigned int height, int bpp) { + LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_reset:"); if (session->client_info != 0) { struct xrdp_client_info *client_info = session->client_info; @@ -1375,6 +1376,10 @@ libxrdp_send_to_channel(struct xrdp_session *session, int channel_id, free_stream(s); return 1; } + else + { + LOG(LOG_LEVEL_TRACE, "libxrdp_send_to_channel: xrdp_channel_init successful!"); + } /* here we make a copy of the data */ out_uint8a(s, data, data_len); @@ -1433,6 +1438,8 @@ libxrdp_drdynvc_open(struct xrdp_session *session, const char *name, struct xrdp_sec *sec; struct xrdp_channel *chan; + LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_drdynvc_open:"); + rdp = (struct xrdp_rdp *) (session->rdp); sec = rdp->sec_layer; chan = sec->chan_layer; @@ -1447,6 +1454,8 @@ libxrdp_drdynvc_close(struct xrdp_session *session, int chan_id) struct xrdp_sec *sec; struct xrdp_channel *chan; + LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_drdynvc_close:"); + rdp = (struct xrdp_rdp *) (session->rdp); sec = rdp->sec_layer; chan = sec->chan_layer; @@ -1463,6 +1472,8 @@ libxrdp_drdynvc_data_first(struct xrdp_session *session, int chan_id, struct xrdp_sec *sec; struct xrdp_channel *chan; + LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_drdynvc_data_first:"); + rdp = (struct xrdp_rdp *) (session->rdp); sec = rdp->sec_layer; chan = sec->chan_layer; @@ -1479,6 +1490,8 @@ libxrdp_drdynvc_data(struct xrdp_session *session, int chan_id, struct xrdp_sec *sec; struct xrdp_channel *chan; + LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_drdynvc_data:"); + rdp = (struct xrdp_rdp *) (session->rdp); sec = rdp->sec_layer; chan = sec->chan_layer; diff --git a/xrdp/xrdp_egfx.c b/xrdp/xrdp_egfx.c index 76b3015b..ca196ebe 100644 --- a/xrdp/xrdp_egfx.c +++ b/xrdp/xrdp_egfx.c @@ -250,7 +250,7 @@ xrdp_egfx_fill_surface(struct xrdp_egfx_bulk *bulk, int surface_id, /* RDP_SEGMENTED_DATA */ out_uint8(s, 0xE0); /* descriptor = SINGLE */ /* RDP8_BULK_ENCODED_DATA */ - out_uint8(s, PACKET_COMPR_TYPE_RDP8); /* header */ + out_uint8(s, PACKET_COMPR_TYPE_RDP8); /* header */ /* RDPGFX_HEADER */ out_uint16_le(s, XR_RDPGFX_CMDID_SOLIDFILL); /* cmdId */ out_uint16_le(s, 0); /* flags = 0 */ @@ -538,8 +538,8 @@ xrdp_egfx_wire_to_surface1(struct xrdp_egfx_bulk *bulk, int surface_id, /* RDP8_BULK_ENCODED_DATA */ out_uint8(s, PACKET_COMPR_TYPE_RDP8); /* header */ out_uint8a(s, bitmap_data8 + index, segment_size); - LOG(LOG_LEVEL_DEBUG, " segment index %d" - " segment_size %d", segment_count, segment_size); + LOG(LOG_LEVEL_DEBUG, " segment index %d segment_size %d", + segment_count, segment_size); index += segment_size; segment_count++; } @@ -724,9 +724,8 @@ xrdp_egfx_reset_graphics(struct xrdp_egfx_bulk *bulk, int width, int height, mi[index].is_primary); } } - LOG(LOG_LEVEL_INFO, "xrdp_egfx_send_reset_graphics:" - " width %d height %d monitorcount %d", - width, height, monitor_count); + LOG(LOG_LEVEL_INFO, "xrdp_egfx_reset_graphics: width %d height %d " + "monitorcount %d", width, height, monitor_count); if (monitor_count < 16) { bytes = 340 - (20 + (monitor_count * 20)); @@ -901,7 +900,6 @@ xrdp_egfx_process(struct xrdp_egfx *egfx, struct stream *s) default: LOG(LOG_LEVEL_DEBUG, "xrdp_egfx_process:" " unknown cmdId 0x%x", cmdId); - //g_hexdump(s->p, MIN(pduLength - 8, 64)); break; } if (error != 0) diff --git a/xup/xup.c b/xup/xup.c index cf11f2ec..8d472c77 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -1121,6 +1121,8 @@ send_suppress_output(struct mod *mod, int suppress, static int process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s) { + LOG(LOG_LEVEL_TRACE, "process_server_paint_rect_shmem_ex:"); + int num_drects; int num_crects; int flags;