From 72a2407334e9a9eca2045430987d20f0a7926853 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 12 Dec 2023 15:57:05 +0100 Subject: [PATCH] Fix logging when no working VeNCrypt types Otherwise it will log that we chose the (invalid) type 0. --- common/rfb/CSecurityVeNCrypt.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/rfb/CSecurityVeNCrypt.cxx b/common/rfb/CSecurityVeNCrypt.cxx index 59be49a0..3c8e91ba 100644 --- a/common/rfb/CSecurityVeNCrypt.cxx +++ b/common/rfb/CSecurityVeNCrypt.cxx @@ -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 */ -- 2.39.5