summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2013-11-19 21:34:07 +0200
committerspeidy <speidy@gmail.com>2013-11-19 21:34:07 +0200
commit6f7958bdcbcc65cc073f1f8f7f1e3bb98d011173 (patch)
treee49c356b6e47ffd3eb0ba2ce8f76d73a79ac3e3e
parente5f2f997db5c4d523cbd9da24b83b1b117f81466 (diff)
downloadxrdp-proprietary-6f7958bdcbcc65cc073f1f8f7f1e3bb98d011173.tar.gz
xrdp-proprietary-6f7958bdcbcc65cc073f1f8f7f1e3bb98d011173.zip
libxrdp: move xrdp_rdp_send_monitorlayout call after demand active pdu
-rw-r--r--libxrdp/libxrdp.c11
-rw-r--r--libxrdp/libxrdp.h2
-rw-r--r--libxrdp/xrdp_rdp.c14
3 files changed, 14 insertions, 13 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c
index e72fa1d0..ac5bbe98 100644
--- a/libxrdp/libxrdp.c
+++ b/libxrdp/libxrdp.c
@@ -107,6 +107,17 @@ libxrdp_process_data(struct xrdp_session *session)
{
case -1:
xrdp_rdp_send_demand_active((struct xrdp_rdp *)session->rdp);
+
+ // send Monitor Layout PDU for multimon
+ if (session->client_info->monitorCount > 0 && session->client_info->multimon == 1)
+ {
+ DEBUG(("sending monitor layout pdu"));
+ if (xrdp_rdp_send_monitorlayout((struct xrdp_rdp *)session->rdp) != 0)
+ {
+ g_writeln("xrdp_rdp_send_monitorlayout: error");
+ }
+ }
+
session->up_and_running = 0;
break;
case 0:
diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h
index 5bf627b5..70c8a124 100644
--- a/libxrdp/libxrdp.h
+++ b/libxrdp/libxrdp.h
@@ -353,6 +353,8 @@ xrdp_rdp_incoming(struct xrdp_rdp* self);
int APP_CC
xrdp_rdp_send_demand_active(struct xrdp_rdp* self);
int APP_CC
+xrdp_rdp_send_monitorlayout(struct xrdp_rdp* self);
+int APP_CC
xrdp_rdp_process_confirm_active(struct xrdp_rdp* self, struct stream* s);
int APP_CC
xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s);
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index 1712704e..48deb6e2 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -1572,7 +1572,7 @@ xrdp_rdp_send_fontmap(struct xrdp_rdp *self)
return 0;
}
/*****************************************************************************/
-static int APP_CC
+int APP_CC
xrdp_rdp_send_monitorlayout(struct xrdp_rdp *self)
{
struct stream *s;
@@ -1629,18 +1629,6 @@ xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
DEBUG(("sending fontmap"));
xrdp_rdp_send_fontmap(self);
- /* TODO: Monitor Layout PDU should send to client after demand active pdu
- * MOVE THAT CALL
- */
- if (self->client_info.monitorCount > 0 && self->client_info.multimon == 1)
- {
- DEBUG(("sending monitor layout pdu"));
- 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);