diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-10-04 15:55:48 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-10-04 15:55:48 +0200 |
commit | 63d2fddd6b613406d9ea28dcd5d1c58feb167126 (patch) | |
tree | 7af844fcd1cf3ef8d1512b15ae404e98a096d301 /unix/xserver | |
parent | a846421a73d20e409379fd0ff620b27cac8fbcba (diff) | |
download | tigervnc-63d2fddd6b613406d9ea28dcd5d1c58feb167126.tar.gz tigervnc-63d2fddd6b613406d9ea28dcd5d1c58feb167126.zip |
Don't queue a query if it is directly rejected
Otherwise we'll wedge the desktop object which expects an approval
or rejection to eventually show up.
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index 2131db65..dd1d4ca0 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -306,6 +306,12 @@ XserverDesktop::queryConnection(network::Socket* sock, return rfb::VNCServerST::REJECT; } + count = vncNotifyQueryConnect(); + if (count == 0) { + *reason = strDup("Unable to query the local user to accept the connection."); + return rfb::VNCServerST::REJECT; + } + queryConnectAddress.replaceBuf(sock->getPeerAddress()); if (!userName) userName = "(anonymous)"; @@ -313,12 +319,6 @@ XserverDesktop::queryConnection(network::Socket* sock, queryConnectId = (uint32_t)(intptr_t)sock; queryConnectSocket = sock; - count = vncNotifyQueryConnect(); - if (count == 0) { - *reason = strDup("Unable to query the local user to accept the connection."); - return rfb::VNCServerST::REJECT; - } - return rfb::VNCServerST::PENDING; } |