From b993ea78d72323709a9e1c6a2fac03e214ef5209 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 1 Sep 2017 11:15:57 +0200 Subject: [PATCH] Use better security method description when using VeNCrypt The sub-modules generally provide a better description than just the short security method name. --- common/rfb/CSecurityVeNCrypt.cxx | 7 +++++++ common/rfb/CSecurityVeNCrypt.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/rfb/CSecurityVeNCrypt.cxx b/common/rfb/CSecurityVeNCrypt.cxx index 4a25245a..f9597cc7 100644 --- a/common/rfb/CSecurityVeNCrypt.cxx +++ b/common/rfb/CSecurityVeNCrypt.cxx @@ -191,6 +191,13 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc) return csecurity->processMsg(cc); } +const char* CSecurityVeNCrypt::description() const +{ + if (csecurity) + return csecurity->description(); + return "VeNCrypt"; +} + bool CSecurityVeNCrypt::isSecure() const { if (csecurity && csecurity->isSecure()) diff --git a/common/rfb/CSecurityVeNCrypt.h b/common/rfb/CSecurityVeNCrypt.h index 1ff0c020..6d978c75 100644 --- a/common/rfb/CSecurityVeNCrypt.h +++ b/common/rfb/CSecurityVeNCrypt.h @@ -38,7 +38,7 @@ namespace rfb { ~CSecurityVeNCrypt(); virtual bool processMsg(CConnection* cc);// { return true; } int getType() const {return chosenType;} - virtual const char* description() const { return secTypeName(chosenType); } + virtual const char* description() const; virtual bool isSecure() const; protected: -- 2.39.5