summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2013-11-17 16:23:11 +0200
committerspeidy <speidy@gmail.com>2013-11-17 16:23:11 +0200
commit2dc5f491323a23c6ce758e9cb82ca4eb5ff21478 (patch)
tree8e55c3bf7488a416de4a821b67b764d4d119b710
parent4bce6f78c098bf98e0dcd33753b844daa8803e1e (diff)
downloadxrdp-proprietary-2dc5f491323a23c6ce758e9cb82ca4eb5ff21478.tar.gz
xrdp-proprietary-2dc5f491323a23c6ce758e9cb82ca4eb5ff21478.zip
libxrdp: add Montior Layout PDU (server to client), temporary hack
-rw-r--r--libxrdp/xrdp_rdp.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index 5f358fca..f07cf251 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -52,6 +52,16 @@ static tui8 g_unknown1[172] =
0x2b, 0x00, 0x2a, 0x00
};
+static tui8 g_monitorlayout[44] =
+{
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x7F, 0x07, 0x00, 0x00,
+ 0x37, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFF, 0x0E, 0x00, 0x00, 0x37, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
/* some compilers need unsigned char to avoid warnings */
/*
static tui8 g_unknown2[8] =
@@ -1600,7 +1610,33 @@ xrdp_rdp_send_unknown1(struct xrdp_rdp *self)
free_stream(s);
return 0;
}
+/*****************************************************************************/
+static int APP_CC
+xrdp_rdp_send_monitorlayout(struct xrdp_rdp *self)
+{
+ struct stream *s;
+ make_stream(s);
+ init_stream(s, 8192);
+
+ if (xrdp_rdp_init_data(self, s) != 0)
+ {
+ free_stream(s);
+ return 1;
+ }
+
+ out_uint8a(s, g_monitorlayout, 44);
+ s_mark_end(s);
+
+ if (xrdp_rdp_send_data(self, s, 0x37) != 0)
+ {
+ free_stream(s);
+ return 1;
+ }
+
+ free_stream(s);
+ return 0;
+}
/*****************************************************************************/
static int APP_CC
xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
@@ -1619,6 +1655,12 @@ xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
/* running */
DEBUG(("sending unknown1"));
xrdp_rdp_send_unknown1(self);
+ if (self->client_info.monitorCount > 0) {
+ if (xrdp_rdp_send_monitorlayout(self) != 0)
+ {
+ g_writeln("Problem with monitor layout packet!!!");
+ }
+ }
self->session->up_and_running = 1;
DEBUG(("up_and_running set"));
xrdp_rdp_send_data_update_sync(self);