From 6f74efa70a1002a458ff0c9a4dc7d6e62078f0d9 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 17 Jul 2016 23:28:37 -0700 Subject: add session_info Conflicts: libxrdp/libxrdp.h --- libxrdp/xrdp_rdp.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'libxrdp/xrdp_rdp.c') diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 219c0260..9b1f54fd 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -1252,3 +1252,44 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self) DEBUG(("out xrdp_rdp_send_deactivate")); return 0; } + +/*****************************************************************************/ +int APP_CC +xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data, + int data_bytes) +{ + struct stream *s; + + LLOGLN(0, ("xrdp_rdp_send_session_info: data_bytes %d", data_bytes)); + make_stream(s); + init_stream(s, 8192); + + if (xrdp_rdp_init_data(self, s) != 0) + { + free_stream(s); + return 1; + } + + if (s_check_rem_out(s, data_bytes)) + { + out_uint8a(s, data, data_bytes); + } + else + { + free_stream(s); + return 1; + } + + s_mark_end(s); + + /* SAVE_SESSION_INFO 0x26 */ + if (xrdp_rdp_send_data(self, s, 0x26) != 0) + { + free_stream(s); + return 1; + } + + free_stream(s); + return 0; +} + -- cgit v1.2.1 From b7da395b5e46eab4b333d53e66e7f5da61a3dc11 Mon Sep 17 00:00:00 2001 From: speidy Date: Sun, 15 Jan 2017 08:51:43 +0200 Subject: libxrdp: use constant RDP_DATA_PDU_LOGON --- libxrdp/xrdp_rdp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libxrdp/xrdp_rdp.c') diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 9b1f54fd..49d8c4b2 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -1282,8 +1282,7 @@ xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data, s_mark_end(s); - /* SAVE_SESSION_INFO 0x26 */ - if (xrdp_rdp_send_data(self, s, 0x26) != 0) + if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_LOGON) != 0) { free_stream(s); return 1; -- cgit v1.2.1