]> source.dussan.org Git - tigervnc.git/commitdiff
Move reverse connection information into VNCSConnectionST
authorPierre Ossman <ossman@cendio.se>
Fri, 6 Feb 2015 13:41:58 +0000 (14:41 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 13 Feb 2015 10:13:53 +0000 (11:13 +0100)
The only class that cares if connections are reversed or not is
VNCSConnectionST so let it keep track of this fact.

common/rfb/SConnection.cxx
common/rfb/SConnection.h
common/rfb/VNCSConnectionST.cxx
common/rfb/VNCSConnectionST.h

index 99a4850cef9bfbbf436f90251fe80b52bee7b683..9bff4cd8de38f4d8120043f7595dd1f303e5bd2e 100644 (file)
@@ -48,11 +48,10 @@ const SConnection::AccessRights SConnection::AccessNoQuery        = 0x0400;
 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;
index fd6d26348a1600850cfa4b2c40e16b865400f9ca..f154218680cc05fa174033edff756fdbc5da0d3a 100644 (file)
@@ -38,7 +38,7 @@ namespace rfb {
   class SConnection : public SMsgHandler {
   public:
 
-    SConnection(bool reverseConnection_);
+    SConnection();
     virtual ~SConnection();
 
     // Methods to initialise the connection
@@ -206,7 +206,6 @@ namespace rfb {
     SecurityServer *security;
     SSecurity* ssecurity;
     stateEnum state_;
-    bool reverseConnection;
     rdr::S32 preferredEncoding;
   };
 }
index 746bb9019d320f22d035ab9df968e7f646845cc4..e261cfbac303f9e78a3badfa5df410938e7d7efc 100644 (file)
@@ -66,7 +66,7 @@ struct RTTInfo {
 
 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),
index 7b25570de61008ed6b63b2097c45c5c59b868f28..978879f882018e68abe01b67951caf6f828d0940 100644 (file)
@@ -173,6 +173,7 @@ namespace rfb {
 
     network::Socket* sock;
     CharArray peerEndpoint;
+    bool reverseConnection;
 
     Timer queryConnectTimer;