Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 474:f0bd5f2c4ba3
unique node id is now static.
prevent dupricate rootStart on direct mode
author | one |
---|---|
date | Thu, 24 Nov 2016 17:44:54 +0900 |
parents | 37b1e8cbc6bb |
children | b26c934c2bfb |
files | src/main/java/com/glavsoft/rfb/protocol/ProtocolContext.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java |
diffstat | 3 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ProtocolContext.java Thu Nov 24 16:40:16 2016 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ProtocolContext.java Thu Nov 24 17:44:54 2016 +0900 @@ -80,6 +80,10 @@ TreeRFBProto getRfb(); + final int MAX_UNIQUE_NODE_ID = 20000; + + final int MAX_RANDAM_NODE_ID = 30000; + /** * TreeVNC expension command (server to client) * 0 : command byte
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Nov 24 16:40:16 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Nov 24 17:44:54 2016 +0900 @@ -71,7 +71,7 @@ private DatagramSocket socket = null; private byte[] originalInitData = null; private boolean childrenMulticast = true; - private int uniqueNodeId = 0; // uniquenodeid in all trees + private static int uniqueNodeId = 0; // uniquenodeid in all trees (less than MAX_UNIQUE_NODE_ID) public TreeRFBProto(boolean isTreeManager, ViewerInterface viewer) { nets.setMyRfb(this);
--- a/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Thu Nov 24 16:40:16 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Thu Nov 24 17:44:54 2016 +0900 @@ -61,6 +61,7 @@ if (hostName != null) { if (direct) { rootStart(args, new VncProxyService()); + return; } else { // send whereToConnect v.startTreeViewer(hostName, cui, addSerialNum);