diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-10-05 16:59:22 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-10-09 17:22:17 +0200 |
commit | e6aab2465493d6088c5218d888d9b77d069e514c (patch) | |
tree | f2f6ebc586125dd7e2dc8c47925fcbcc146eef37 /unix/x0vncserver | |
parent | 4a4453fc69cf56f9991a13a62023969dcf5b8a4f (diff) | |
download | tigervnc-e6aab2465493d6088c5218d888d9b77d069e514c.tar.gz tigervnc-e6aab2465493d6088c5218d888d9b77d069e514c.zip |
Force common flow of connection queries
Force queryConnection() to always call back to approveConnection()
rather than return special values. This makes the flow easier to
follow as it will be the same in all cases.
Diffstat (limited to 'unix/x0vncserver')
-rw-r--r-- | unix/x0vncserver/x0vncserver.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx index c08572be..9b84ca29 100644 --- a/unix/x0vncserver/x0vncserver.cxx +++ b/unix/x0vncserver/x0vncserver.cxx @@ -87,12 +87,11 @@ public: ~QueryConnHandler() { delete queryConnectDialog; } // -=- VNCServerST::QueryConnectionHandler interface - virtual VNCServerST::queryResult queryConnection(network::Socket* sock, - const char* userName, - char** reason) { + virtual void queryConnection(network::Socket* sock, + const char* userName) { if (queryConnectSock) { - *reason = strDup("Another connection is currently being queried."); - return VNCServerST::REJECT; + server->approveConnection(sock, false, "Another connection is currently being queried."); + return; } if (!userName) userName = "(anonymous)"; queryConnectSock = sock; @@ -102,7 +101,6 @@ public: userName, queryConnectTimeout, this); queryConnectDialog->map(); - return VNCServerST::PENDING; } // -=- QueryResultCallback interface |