From ad2b3c4aa3db056b83f5d91564400e03f3239835 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 21 Sep 2018 15:31:11 +0200 Subject: 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. --- common/rfb/CSecurityStack.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common/rfb/CSecurityStack.cxx') diff --git a/common/rfb/CSecurityStack.cxx b/common/rfb/CSecurityStack.cxx index 47c3f6db..55f3133e 100644 --- a/common/rfb/CSecurityStack.cxx +++ b/common/rfb/CSecurityStack.cxx @@ -21,9 +21,9 @@ using namespace rfb; -CSecurityStack::CSecurityStack(int Type, const char*Name, CSecurity* s0, - CSecurity* s1) - :name(Name),type(Type) +CSecurityStack::CSecurityStack(CConnection* cc, int Type, const char* Name, + CSecurity* s0, CSecurity* s1) + : CSecurity(cc), name(Name), type(Type) { state = 0; state0 = s0; @@ -38,12 +38,12 @@ CSecurityStack::~CSecurityStack() delete state1; } -bool CSecurityStack::processMsg(CConnection* cc) +bool CSecurityStack::processMsg() { bool res=true; if (state == 0) { if (state0) - res = state0->processMsg(cc); + res = state0->processMsg(); if (!res) return res; @@ -53,7 +53,7 @@ bool CSecurityStack::processMsg(CConnection* cc) if (state == 1) { if(state1) - res = state1->processMsg(cc); + res = state1->processMsg(); if(!res) return res; -- cgit v1.2.3