]> source.dussan.org Git - tigervnc.git/commitdiff
[Development] Add more debug logging into {C,S}SecurityVeNCrypt.
authorAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 15:13:24 +0000 (15:13 +0000)
committerAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 15:13:24 +0000 (15:13 +0000)
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

common/rfb/CSecurityVeNCrypt.cxx
common/rfb/SSecurityVeNCrypt.cxx

index 521f7060f0ea1ac75fce9696340e8d92a7748d09..87b81b60e179750ad46ee2de33649b8eb58ca6e2 100644 (file)
@@ -29,6 +29,7 @@
 #include <rfb/CSecurityTLS.h>\r
 #include <rfb/CSecurityVeNCrypt.h>\r
 #include <rfb/CSecurityVncAuth.h>\r
+#include <rfb/LogWriter.h>\r
 #include <rfb/SSecurityVeNCrypt.h>\r
 #include <list>\r
 \r
@@ -36,6 +37,8 @@ using namespace rfb;
 using namespace rdr;\r
 using namespace std;\r
 \r
+static LogWriter vlog("CVeNCrypt");\r
+\r
 CSecurityVeNCrypt::CSecurityVeNCrypt(void) : csecurity(NULL)\r
 {\r
   haveRecvdMajorVersion = false;\r
@@ -131,6 +134,9 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc)
       if (is->checkNoWait(4)) {\r
        availableTypes[iAvailableType++] = is->readU32();\r
        haveListOfTypes = (iAvailableType >= nAvailableTypes);\r
+       vlog.debug("Server offers security type %s (%d)",\r
+                  secTypeName(availableTypes[iAvailableType - 1]),\r
+                  availableTypes[iAvailableType - 1]);\r
 \r
        if (!haveListOfTypes)\r
          return false;\r
@@ -161,6 +167,8 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc)
          break;\r
       }\r
 \r
+      vlog.debug("Choosing security type %s (%d)", secTypeName(chosenType),\r
+                chosenType);\r
       /* Set up the stack according to the chosen type: */\r
       switch (chosenType) {\r
        case secTypeTLSNone:\r
index b8f9b5773d7b88f7ce7126728a4c94a150b1ebb0..b13659982ed2dad7b17b4ed66e6e4e18eed0abbb 100644 (file)
@@ -178,6 +178,8 @@ bool SSecurityVeNCrypt::processMsg(SConnection* sc)
     if (!haveChosenType)\r
       chosenType = secTypeInvalid;\r
 \r
+    vlog.debug("Choosing security type %s (%d)", secTypeName(chosenType),\r
+              chosenType);\r
     /* Set up the stack according to the chosen type */\r
     switch(chosenType) {\r
     case secTypeTLSNone:\r