From 9990eec9b9aabacedff6e3c24b757533807222dc Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Sun, 4 Sep 2011 12:40:15 +0000 Subject: [PATCH] fixed protocol version < 3.7 secType bug git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4667 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/src/com/tigervnc/rfb/CConnection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/src/com/tigervnc/rfb/CConnection.java b/java/src/com/tigervnc/rfb/CConnection.java index da4ac6fd..15e19896 100644 --- a/java/src/com/tigervnc/rfb/CConnection.java +++ b/java/src/com/tigervnc/rfb/CConnection.java @@ -100,6 +100,7 @@ abstract public class CConnection extends CMsgHandler { vlog.info("processing security types message"); int secType = Security.secTypeInvalid; + List secTypes = new ArrayList(); secTypes = security.GetEnabledSecTypes(); //for (Iterator i = secTypes.iterator(); i.hasNext(); ) @@ -121,10 +122,10 @@ abstract public class CConnection extends CMsgHandler { secType = refType; break; } + if (!i.hasNext()) + secType = Security.secTypeInvalid; } - if (!i.hasNext()) - secType = Security.secTypeInvalid; } else { vlog.error("Unknown 3.3 security type "+secType); throw new Exception("Unknown 3.3 security type"); -- 2.39.5