diff options
Diffstat (limited to 'win/winvnc')
-rw-r--r-- | win/winvnc/VNCServerWin32.cxx | 16 | ||||
-rw-r--r-- | win/winvnc/VNCServerWin32.h | 5 |
2 files changed, 10 insertions, 11 deletions
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx index 9f6a954d..93bf5c0a 100644 --- a/win/winvnc/VNCServerWin32.cxx +++ b/win/winvnc/VNCServerWin32.cxx @@ -249,19 +249,19 @@ bool VNCServerWin32::setClientsStatus(rfb::ListConnInfo* LCInfo) { return queueCommand(SetClientsStatus, LCInfo, 0); } -VNCServerST::queryResult VNCServerWin32::queryConnection(network::Socket* sock, - const char* userName, - char** reason) +void VNCServerWin32::queryConnection(network::Socket* sock, + const char* userName) { - if (queryOnlyIfLoggedOn && CurrentUserToken().noUserLoggedOn()) - return VNCServerST::ACCEPT; + if (queryOnlyIfLoggedOn && CurrentUserToken().noUserLoggedOn()) { + vncServer.approveConnection(sock, true, NULL); + return; + } if (queryConnectDialog) { - *reason = rfb::strDup("Another connection is currently being queried."); - return VNCServerST::REJECT; + vncServer.approveConnection(sock, false, "Another connection is currently being queried."); + return; } queryConnectDialog = new QueryConnectDialog(sock, userName, this); queryConnectDialog->startDialog(); - return VNCServerST::PENDING; } void VNCServerWin32::queryConnectionComplete() { diff --git a/win/winvnc/VNCServerWin32.h b/win/winvnc/VNCServerWin32.h index 271cb76a..58c3f6c6 100644 --- a/win/winvnc/VNCServerWin32.h +++ b/win/winvnc/VNCServerWin32.h @@ -81,9 +81,8 @@ namespace winvnc { // VNCServerST::QueryConnectionHandler interface // Callback used to prompt user to accept or reject a connection. // CALLBACK IN VNCServerST "HOST" THREAD - virtual rfb::VNCServerST::queryResult queryConnection(network::Socket* sock, - const char* userName, - char** reason); + virtual void queryConnection(network::Socket* sock, + const char* userName); // SocketManager::AddressChangeNotifier interface // Used to keep tray icon up to date |