From 864c35d615f15f0b34edff7a24af7542907d491e Mon Sep 17 00:00:00 2001 From: Kelven Yang Date: Mon, 6 Dec 2010 11:42:38 -0800 Subject: [PATCH] bug 7316: VMware send unrecognized ZLRE encoding packet, switch to less-efficient but widely supported basic encoding mode. As the encoding is used between console proxy and the target host, which is within backend local network, it shouldn't affect AJAX performance --- .../src/com/cloud/consoleproxy/ConsoleProxyViewer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyViewer.java b/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyViewer.java index 98453acf134..bf8747a8e5b 100644 --- a/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyViewer.java +++ b/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyViewer.java @@ -219,9 +219,8 @@ public class ConsoleProxyViewer implements java.lang.Runnable, RfbViewer, RfbPro String msg = e.getMessage(); s_logger.warn("Authentication exception, msg: " + msg + "sid: " + this.passwordParam); } catch (Exception e) { - status = STATUS_ERROR; - if(s_logger.isDebugEnabled()) - s_logger.debug("Exception : ", e); + status = STATUS_ERROR; + s_logger.error("Unexpected exception ", e); } finally { // String oldName = Thread.currentThread().getName(); encodingsSaved = null; @@ -372,7 +371,9 @@ public class ConsoleProxyViewer implements java.lang.Runnable, RfbViewer, RfbPro void setEncodings(boolean autoSelectOnly) { if (options == null || rfb == null || !rfb.inNormalProtocol) return; - + + options.preferredEncoding = RfbProto.EncodingHextile; + int preferredEncoding = options.preferredEncoding; if (preferredEncoding == -1) { long kbitsPerSecond = rfb.kbitsPerSecond();