Browse Source

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.
tags/v1.8.90
Pierre Ossman 6 years ago
parent
commit
63d2fddd6b
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      unix/xserver/hw/vnc/XserverDesktop.cc

+ 6
- 6
unix/xserver/hw/vnc/XserverDesktop.cc View File

@@ -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;
}


Loading…
Cancel
Save