[Development] Add more debug logging into {C,S}SecurityVeNCrypt.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4100 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/CSecurityVeNCrypt.cxx b/common/rfb/CSecurityVeNCrypt.cxx
index 521f706..87b81b6 100644
--- a/common/rfb/CSecurityVeNCrypt.cxx
+++ b/common/rfb/CSecurityVeNCrypt.cxx
@@ -29,6 +29,7 @@
#include <rfb/CSecurityTLS.h>
#include <rfb/CSecurityVeNCrypt.h>
#include <rfb/CSecurityVncAuth.h>
+#include <rfb/LogWriter.h>
#include <rfb/SSecurityVeNCrypt.h>
#include <list>
@@ -36,6 +37,8 @@
using namespace rdr;
using namespace std;
+static LogWriter vlog("CVeNCrypt");
+
CSecurityVeNCrypt::CSecurityVeNCrypt(void) : csecurity(NULL)
{
haveRecvdMajorVersion = false;
@@ -131,6 +134,9 @@
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 @@
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 b8f9b57..b136599 100644
--- a/common/rfb/SSecurityVeNCrypt.cxx
+++ b/common/rfb/SSecurityVeNCrypt.cxx
@@ -178,6 +178,8 @@
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: