aboutsummaryrefslogtreecommitdiff
path: root/system/xrdp/xrdp-v0.6.1_cleanup-state.diff
diff options
context:
space:
mode:
authormancha <mancha1@hush.com>2015-02-20 16:08:35 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-02-20 16:08:35 +0700
commit0f94b3b5786e7346a0b202a3632994bbff0185f2 (patch)
tree3a77c8ebf4a69fc03521da3862d9f49d74c056ea /system/xrdp/xrdp-v0.6.1_cleanup-state.diff
parentbb953ca21b89a196f13dbd5d56ba810a4f7c4d04 (diff)
system/xrdp: Rebuilt with patches.
Thanks to Mancha. Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/xrdp/xrdp-v0.6.1_cleanup-state.diff')
-rw-r--r--system/xrdp/xrdp-v0.6.1_cleanup-state.diff51
1 files changed, 51 insertions, 0 deletions
diff --git a/system/xrdp/xrdp-v0.6.1_cleanup-state.diff b/system/xrdp/xrdp-v0.6.1_cleanup-state.diff
new file mode 100644
index 0000000000000..32d8cb59ef688
--- /dev/null
+++ b/system/xrdp/xrdp-v0.6.1_cleanup-state.diff
@@ -0,0 +1,51 @@
+From fca088da8caab209534db2c6ff9dcda277a529a7 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Wed, 18 Feb 2015
+Subject: Clean our state
+
+Make sure our state is clean when we're at the login window. This
+code, adapted from upstream's development branch, ensures settings
+from previous connections are cleared.
+
+---
+ xrdp/xrdp_mm.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/xrdp/xrdp_mm.c
++++ b/xrdp/xrdp_mm.c
+@@ -899,6 +899,25 @@ xrdp_mm_sesman_data_in(struct trans* tra
+ }
+
+ /*****************************************************************************/
++static void APP_CC
++cleanup_states(struct xrdp_mm *self)
++{
++ if (self != NULL)
++ {
++ self-> connected_state = 0; /* true if connected to sesman else false */
++ self-> sesman_trans = NULL; /* connection to sesman */
++ self-> sesman_trans_up = 0; /* true once connected to sesman */
++ self-> delete_sesman_trans = 0; /* boolean set when done with sesman connection */
++ self-> display = 0; /* 10 for :10.0, 11 for :11.0, etc */
++ self-> code = 0; /* 0 Xvnc session, 10 X11rdp session, 20 Xorg session */
++ self-> sesman_controlled = 0; /* true if this is a sesman session */
++ self-> chan_trans = NULL; /* connection to chansrv */
++ self-> chan_trans_up = 0; /* true once connected to chansrv */
++ self-> delete_chan_trans = 0; /* boolean set when done with channel connection */
++ }
++}
++
++/*****************************************************************************/
+ int APP_CC
+ xrdp_mm_connect(struct xrdp_mm* self)
+ {
+@@ -916,6 +939,9 @@ xrdp_mm_connect(struct xrdp_mm* self)
+ char text[256];
+ char port[8];
+
++ /* make sure we start in correct state */
++ cleanup_states(self);
++
+ g_memset(ip,0,sizeof(char) * 256);
+ g_memset(errstr,0,sizeof(char) * 256);
+ g_memset(text,0,sizeof(char) * 256);