# HG changeset patch # User Shinji KONO # Date 1402923351 -32400 # Node ID 33c7a08c90e797209bd13b22c38cc64beab8b77d # Parent e997deb54314fd33616a1b293283b91223a929f6 Update root accept port in node list after selectPort diff -r e997deb54314 -r 33c7a08c90e7 src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeVNCNode.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeVNCNode.java Mon Jun 16 20:09:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/TreeVNCNode.java Mon Jun 16 21:55:51 2014 +0900 @@ -28,5 +28,9 @@ return port; } + public void setPort(int acceptPort) { + port = acceptPort; + } + } diff -r e997deb54314 -r 33c7a08c90e7 src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Mon Jun 16 20:09:38 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Mon Jun 16 21:55:51 2014 +0900 @@ -72,7 +72,7 @@ private void initRoot(String hostName) { myRfb = new MyRfbProtoProxy(); myRfb.setVncProxy(this); - clients = new TreeManagement(hostName, vncport,myRfb); + clients = new TreeManagement(hostName, ConnectionParams.DEFAULT_VNC_ROOT,myRfb); isApplet = false; setIsTreeVNC(true); setConnectionParam(hostName,vncport); @@ -103,6 +103,9 @@ */ public void createConnectionAndStart() { myRfb.selectPort(ConnectionParams.DEFAULT_VNC_ROOT); + if (clients!=null) { + clients.getList().getFirst().setPort(myRfb.getAcceptPort()); + } acceptThread = new TreeVncCommandChannelListener(myRfb, myRfb.getAcceptPort()); Thread thread = new Thread(acceptThread, "TreeVNC-accept"); thread.start();