diff options
author | Cendio <cendio@pairstation.lkpg.cendio.se> | 2018-03-01 13:52:54 +0100 |
---|---|---|
committer | Cendio <cendio@pairstation.lkpg.cendio.se> | 2018-03-01 13:52:54 +0100 |
commit | 62ea190c0c5a99d2f06b02f4d45ad9d63906d897 (patch) | |
tree | 5c9df61c42d8421804b9e8e55c12537b9304c2e6 | |
parent | a0af72a33712e7c650a57ca32d941ad00abf9589 (diff) | |
download | rdesktop-62ea190c0c5a99d2f06b02f4d45ad9d63906d897.zip |
Exit rdesktop if error info is set
This fixes a problem where a connect loop is triggered
when a user is closing the session and there is a pending
resize triggered. When server sends error info PDU, this
means that the client should close and not enter a
reconnect due to pending resize or other reason such as
network error or redirect...
Co-authored-by: Henrik Andersson <hean01@cendio.com>
Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
Co-authored-by: Thomas Nilefalk <thomas@nilefalk.se>
-rw-r--r-- | rdesktop.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1395,6 +1395,7 @@ main(int argc, char *argv[]) deactivated = False; g_reconnect_loop = False; + ext_disc_reason = 0; rdp_main_loop(&deactivated, &ext_disc_reason); tcp_run_ui(False); @@ -1402,6 +1403,16 @@ main(int argc, char *argv[]) logger(Core, Verbose, "Disconnecting..."); rdp_disconnect(); + /* If error info is set we do want to exit rdesktop + connect loop. We do this by clearing flags that + triggers a reconnect that could be set elsewere */ + if (ext_disc_reason != 0) + { + g_redirect = False; + g_network_error = False; + g_pending_resize = False; + } + if (g_redirect) continue; @@ -1428,6 +1439,8 @@ main(int argc, char *argv[]) g_reconnect_loop = True; continue; } + + /* exit main reconnect loop */ break; } |