Strongly bind security objects to connection object
There is already an implicit connection between them, so let's make
it explicit. This allows easy lookup outside of the processMsg() function.
diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx
index d7a9d85..fb95377 100644
--- a/common/rfb/CConnection.cxx
+++ b/common/rfb/CConnection.cxx
@@ -235,14 +235,14 @@
}
state_ = RFBSTATE_SECURITY;
- csecurity = security.GetCSecurity(secType);
+ csecurity = security.GetCSecurity(this, secType);
processSecurityMsg();
}
void CConnection::processSecurityMsg()
{
vlog.debug("processing security message");
- if (csecurity->processMsg(this)) {
+ if (csecurity->processMsg()) {
state_ = RFBSTATE_SECURITY_RESULT;
processSecurityResultMsg();
}