aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2017-10-04 16:21:57 +0200
committerPierre Ossman <ossman@cendio.se>2017-10-04 16:21:57 +0200
commit36304753691c36f6a75d341545ad6ebb9e859362 (patch)
tree940ea0892cb050ef31e615207d3645eeda979825 /common
parent63d2fddd6b613406d9ea28dcd5d1c58feb167126 (diff)
downloadtigervnc-36304753691c36f6a75d341545ad6ebb9e859362.tar.gz
tigervnc-36304753691c36f6a75d341545ad6ebb9e859362.zip
Push query connect timeout back in to Xvnc
It was moved to the common code in f8e3b34c6, but it was unreliable because the state could sometimes get out of sync. Push it back in to Xvnc since it isn't necessarily something all servers will have.
Diffstat (limited to 'common')
-rw-r--r--common/rfb/ServerCore.cxx5
-rw-r--r--common/rfb/ServerCore.h1
-rw-r--r--common/rfb/VNCSConnectionST.cxx10
-rw-r--r--common/rfb/VNCSConnectionST.h2
4 files changed, 2 insertions, 16 deletions
diff --git a/common/rfb/ServerCore.cxx b/common/rfb/ServerCore.cxx
index 59a7cff3..b1097a3e 100644
--- a/common/rfb/ServerCore.cxx
+++ b/common/rfb/ServerCore.cxx
@@ -101,8 +101,3 @@ rfb::BoolParameter rfb::Server::queryConnect
("QueryConnect",
"Prompt the local user to accept or reject incoming connections.",
false);
-rfb::IntParameter rfb::Server::queryConnectTimeout
-("QueryConnectTimeout",
- "Number of seconds to show the Accept Connection dialog before "
- "rejecting the connection",
- 10);
diff --git a/common/rfb/ServerCore.h b/common/rfb/ServerCore.h
index 37923cc1..f915c7a7 100644
--- a/common/rfb/ServerCore.h
+++ b/common/rfb/ServerCore.h
@@ -49,7 +49,6 @@ namespace rfb {
static BoolParameter sendCutText;
static BoolParameter acceptSetDesktopSize;
static BoolParameter queryConnect;
- static IntParameter queryConnectTimeout;
};
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index b183c056..d9bb2815 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -71,7 +71,7 @@ static Cursor emptyCursor(0, 0, Point(0, 0), NULL);
VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
bool reverse)
: sock(s), reverseConnection(reverse),
- queryConnectTimer(this), inProcessMessages(false),
+ inProcessMessages(false),
pendingSyncFence(false), syncFence(false), fenceFlags(0),
fenceDataLen(0), fenceData(NULL),
baseRTT(-1), congWindow(0), ackedOffset(0), sentOffset(0),
@@ -485,10 +485,8 @@ void VNCSConnectionST::queryConnection(const char* userName)
CharArray reason;
VNCServerST::queryResult qr = server->queryConnection(sock, userName,
&reason.buf);
- if (qr == VNCServerST::PENDING) {
- queryConnectTimer.start(rfb::Server::queryConnectTimeout * 1000);
+ if (qr == VNCServerST::PENDING)
return;
- }
// - If server returns ACCEPT/REJECT then pass result to SConnection
approveConnection(qr == VNCServerST::ACCEPT, reason.buf);
@@ -870,10 +868,6 @@ bool VNCSConnectionST::handleTimeout(Timer* t)
try {
if (t == &congestionTimer)
updateCongestion();
- else if (t == &queryConnectTimer) {
- if (state() == RFBSTATE_QUERYING)
- approveConnection(false, "The attempt to prompt the user to accept the connection failed");
- }
} catch (rdr::Exception& e) {
close(e.str());
}
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h
index 9b7b14bb..42eb85ad 100644
--- a/common/rfb/VNCSConnectionST.h
+++ b/common/rfb/VNCSConnectionST.h
@@ -185,8 +185,6 @@ namespace rfb {
CharArray peerEndpoint;
bool reverseConnection;
- Timer queryConnectTimer;
-
bool inProcessMessages;
bool pendingSyncFence, syncFence;