Move reverse connection information into VNCSConnectionST
The only class that cares if connections are reversed or not is
VNCSConnectionST so let it keep track of this fact.
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index 99a4850..9bff4cd 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -48,11 +48,10 @@
const SConnection::AccessRights SConnection::AccessFull = 0xffff;
-SConnection::SConnection(bool reverseConnection_)
+SConnection::SConnection()
: readyForSetColourMapEntries(false),
is(0), os(0), reader_(0), writer_(0),
security(0), ssecurity(0), state_(RFBSTATE_UNINITIALISED),
- reverseConnection(reverseConnection_),
preferredEncoding(encodingRaw)
{
defaultMajorVersion = 3;
diff --git a/common/rfb/SConnection.h b/common/rfb/SConnection.h
index fd6d263..f154218 100644
--- a/common/rfb/SConnection.h
+++ b/common/rfb/SConnection.h
@@ -38,7 +38,7 @@
class SConnection : public SMsgHandler {
public:
- SConnection(bool reverseConnection_);
+ SConnection();
virtual ~SConnection();
// Methods to initialise the connection
@@ -206,7 +206,6 @@
SecurityServer *security;
SSecurity* ssecurity;
stateEnum state_;
- bool reverseConnection;
rdr::S32 preferredEncoding;
};
}
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 746bb90..e261cfb 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -66,7 +66,7 @@
VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
bool reverse)
- : SConnection(reverse), sock(s),
+ : sock(s), reverseConnection(reverse),
queryConnectTimer(this), inProcessMessages(false),
pendingSyncFence(false), syncFence(false), fenceFlags(0),
fenceDataLen(0), fenceData(NULL),
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h
index 7b25570..978879f 100644
--- a/common/rfb/VNCSConnectionST.h
+++ b/common/rfb/VNCSConnectionST.h
@@ -173,6 +173,7 @@
network::Socket* sock;
CharArray peerEndpoint;
+ bool reverseConnection;
Timer queryConnectTimer;