diff options
| author | norrarvid <norrarvid@gmail.com> | 2012-06-05 09:59:04 +0200 |
|---|---|---|
| committer | norrarvid <norrarvid@gmail.com> | 2012-06-05 09:59:04 +0200 |
| commit | a1274b0320f8ec61934192e2711a464572c8548b (patch) | |
| tree | 21c115613c6ffaeadb2f3890f9055142a7b6e2cd /xrdp/xrdp_mm.c | |
| parent | eef475e025b62aaebc24b1eaa603cb3a92ffd07a (diff) | |
| download | xrdp-proprietary-a1274b0320f8ec61934192e2711a464572c8548b.tar.gz xrdp-proprietary-a1274b0320f8ec61934192e2711a464572c8548b.zip | |
Clear state required when relogin is performed
Diffstat (limited to 'xrdp/xrdp_mm.c')
| -rw-r--r-- | xrdp/xrdp_mm.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 2eb538c2..8ca71505 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -1057,6 +1057,27 @@ int access_control(char *username, char *password, char *srv){ #endif /*****************************************************************************/ +/* This routine clears all states to make sure that our next login will be + * as expected. If the user does not press ok on the log window and try to + * connect again we must make sure that no previous information is stored.*/ +void 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 */ + 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 */ + self-> usechansrv = 0; /* true if chansrvport is set in xrdp.ini or using sesman */ + } +} +/*****************************************************************************/ int APP_CC xrdp_mm_connect(struct xrdp_mm* self) { @@ -1083,6 +1104,8 @@ xrdp_mm_connect(struct xrdp_mm* self) username[0] = 0; password[0] = 0; #endif + /* make sure we start in correct state */ + cleanup_states(self); g_memset(ip, 0, sizeof(ip)); g_memset(errstr, 0, sizeof(errstr)); g_memset(text, 0, sizeof(text)); |
