]> source.dussan.org Git - tigervnc.git/commitdiff
Fix logging when no working VeNCrypt types
authorPierre Ossman <ossman@cendio.se>
Tue, 12 Dec 2023 14:57:05 +0000 (15:57 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 12 Dec 2023 14:57:05 +0000 (15:57 +0100)
Otherwise it will log that we chose the (invalid) type 0.

common/rfb/CSecurityVeNCrypt.cxx

index 59be49a0ef3833bbeb29155726283c3ca77ff5f2..3c8e91ba4dbc4a6606fcf47af75b48a5a04f9cb8 100644 (file)
@@ -174,13 +174,13 @@ bool CSecurityVeNCrypt::processMsg()
          break;
       }
 
-      vlog.info("Choosing security type %s (%d)", secTypeName(chosenType),
-                chosenType);
-
       /* Set up the stack according to the chosen type: */
       if (chosenType == secTypeInvalid || chosenType == secTypeVeNCrypt)
        throw AuthFailureException("No valid VeNCrypt sub-type");
 
+      vlog.info("Choosing security type %s (%d)", secTypeName(chosenType),
+                chosenType);
+
       csecurity = security->GetCSecurity(cc, chosenType);
 
       /* send chosen type to server */