From db062b6b518b2807e6cc389c2ff10c5ab18ced29 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 20 Jul 2010 15:13:24 +0000 Subject: [PATCH] [Development] Add more debug logging into {C,S}SecurityVeNCrypt. Signed-off-by: Martin Koegler git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4100 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/rfb/CSecurityVeNCrypt.cxx | 8 ++++++++ common/rfb/SSecurityVeNCrypt.cxx | 2 ++ 2 files changed, 10 insertions(+) diff --git a/common/rfb/CSecurityVeNCrypt.cxx b/common/rfb/CSecurityVeNCrypt.cxx index 521f7060..87b81b60 100644 --- a/common/rfb/CSecurityVeNCrypt.cxx +++ b/common/rfb/CSecurityVeNCrypt.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -36,6 +37,8 @@ using namespace rfb; using namespace rdr; using namespace std; +static LogWriter vlog("CVeNCrypt"); + CSecurityVeNCrypt::CSecurityVeNCrypt(void) : csecurity(NULL) { haveRecvdMajorVersion = false; @@ -131,6 +134,9 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc) if (is->checkNoWait(4)) { availableTypes[iAvailableType++] = is->readU32(); haveListOfTypes = (iAvailableType >= nAvailableTypes); + vlog.debug("Server offers security type %s (%d)", + secTypeName(availableTypes[iAvailableType - 1]), + availableTypes[iAvailableType - 1]); if (!haveListOfTypes) return false; @@ -161,6 +167,8 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc) break; } + vlog.debug("Choosing security type %s (%d)", secTypeName(chosenType), + chosenType); /* Set up the stack according to the chosen type: */ switch (chosenType) { case secTypeTLSNone: diff --git a/common/rfb/SSecurityVeNCrypt.cxx b/common/rfb/SSecurityVeNCrypt.cxx index b8f9b577..b1365998 100644 --- a/common/rfb/SSecurityVeNCrypt.cxx +++ b/common/rfb/SSecurityVeNCrypt.cxx @@ -178,6 +178,8 @@ bool SSecurityVeNCrypt::processMsg(SConnection* sc) if (!haveChosenType) chosenType = secTypeInvalid; + vlog.debug("Choosing security type %s (%d)", secTypeName(chosenType), + chosenType); /* Set up the stack according to the chosen type */ switch(chosenType) { case secTypeTLSNone: -- 2.39.5