From: Brian Hinz Date: Sun, 4 Sep 2011 12:40:15 +0000 (+0000) Subject: fixed protocol version < 3.7 secType bug X-Git-Tag: v1.1.90~141 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9990eec9b9aabacedff6e3c24b757533807222dc;p=tigervnc.git 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 --- 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");