Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 342:4c670edf3065
fix setting remote id
author | oc |
---|---|
date | Mon, 09 Feb 2015 18:17:36 +0900 |
parents | 1d9a4099ad44 |
children | f1721ec54899 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/TreeManagement.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeManagement.java Fri Feb 06 19:56:02 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeManagement.java Mon Feb 09 18:17:36 2015 +0900 @@ -256,7 +256,7 @@ this.netaddress = netaddress; } - public boolean onTheSameNetwork(InetAddress adr ) { + public boolean onTheSameNetwork(InetAddress adr) { byte [] byteadr = adr.getAddress(); if (byteadr.length != netmask.length) return false; for(int i=0; i < netmask.length; i++) {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Fri Feb 06 19:56:02 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Mon Feb 09 18:17:36 2015 +0900 @@ -806,9 +806,11 @@ // send single display width to other node. sendSingleDisplaySize(singleWidth, singleHeight); } + // if have a parent, send serverChangeRequest to the parent with myAddress and port. - if (hasParent()) + if (this.id == -1) { context.sendMessage(new ScreenChangeRequest(myAddress, acceptPort, (short) -1, width, height)); + } if (id == -1) { // change to the tree vnc root on other network. // send whereToConnect. @@ -818,6 +820,7 @@ stopReceiverTask(); return; } + // serverChangeの処理 reconnectingId = id; vncProxyService.inhelitClients(vncProxyService, hostName); // after connecting VNC server, rfb send SEND_INIT_DATA command and wakes me up if necessary