Mercurial > hg > Applications > TreeVNC
changeset 150:925fb2090282
minor fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 13 Jun 2014 13:21:10 +0900 |
parents | 1291cf1122ca |
children | 43b4281cf27d |
files | src/main/java/com/glavsoft/rfb/protocol/state/HandshakeState.java src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/state/HandshakeState.java Fri Jun 13 10:48:07 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/state/HandshakeState.java Fri Jun 13 13:21:10 2014 +0900 @@ -37,7 +37,7 @@ public static final String PROTOCOL_VERSION_3_8 = "3.8"; public static final String PROTOCOL_VERSION_3_7 = "3.7"; public static final String PROTOCOL_VERSION_3_3 = "3.3"; - private static final int PROTOCOL_STRING_LENGTH = 12; + public static final int PROTOCOL_STRING_LENGTH = 12; private static final String PROTOCOL_STRING_REGEXP = "^RFB (\\d\\d\\d).(\\d\\d\\d)\n$"; private static final int MIN_SUPPORTED_VERSION_MAJOR = 3;
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Fri Jun 13 10:48:07 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Fri Jun 13 13:21:10 2014 +0900 @@ -12,14 +12,17 @@ import java.util.zip.DataFormatException; import java.util.zip.Deflater; import java.util.zip.Inflater; + import jp.ac.u_ryukyu.treevnc.client.TreeVncProtocol; import jp.ac.u_ryukyu.treevnc.server.RequestScreenThread; import jp.ac.u_ryukyu.treevnc.server.VncProxyService; + import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.client.ClientToServerMessage; import com.glavsoft.rfb.encoding.EncodingType; import com.glavsoft.rfb.protocol.Protocol; import com.glavsoft.rfb.protocol.ProtocolContext; +import com.glavsoft.rfb.protocol.state.HandshakeState; import com.glavsoft.transport.Reader; import com.glavsoft.transport.Writer; import com.glavsoft.viewer.ViewerImpl; @@ -291,7 +294,7 @@ private byte[] readVersionMsg(Reader reader, Writer writer) throws IOException, TransportException { - byte[] b = new byte[12]; + byte[] b = new byte[HandshakeState.PROTOCOL_STRING_LENGTH ]; reader.readBytes(b);