# HG changeset patch # User oshiro # Date 1548843615 -32400 # Node ID 101b8a3ed8e467d3157a638f4fb9760c15c2c915 # Parent 520a9a3e49759cb26471fdf446124d5ed2a474d8 reconnectionId diff -r 520a9a3e4975 -r 101b8a3ed8e4 Todo.txt --- a/Todo.txt Fri Jan 25 20:49:29 2019 +0900 +++ b/Todo.txt Wed Jan 30 19:20:15 2019 +0900 @@ -1,3 +1,6 @@ +Wed Jan 30 18:55:55 JST 2019 + directconnection 時に nodeid を正しく設定する必要がある + Wed Nov 28 18:45:41 JST 2018 VNCサーバー側が死んだ時にTreeVNCが暴走する Done diff -r 520a9a3e4975 -r 101b8a3ed8e4 src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java Fri Jan 25 20:49:29 2019 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java Wed Jan 30 19:20:15 2019 +0900 @@ -111,10 +111,10 @@ rfb.setId(id); rfb.setMyAddress(myHostName); rfb.setLeader(leader); - if (rfb.isTreeManager()) { + //if (rfb.isTreeManager()) { // markers tree root has a parent on a different network. - rfb.setId((short) -1); - } + // rfb.setId((short) -1); + //} try { rfb.getViewer().connectToParenet(port, hostname); } catch (IOException e) { diff -r 520a9a3e4975 -r 101b8a3ed8e4 src/viewer_swing/java/com/glavsoft/viewer/Viewer.java --- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Fri Jan 25 20:49:29 2019 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Wed Jan 30 19:20:15 2019 +0900 @@ -226,6 +226,7 @@ final boolean hasJsch = checkJsch(); final boolean allowInteractive = allowAppletInteractiveConnections || ! isApplet; connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); + connectionPresenter.setReconnectingId(myRfb.getId()); connectionPresenter.setNoConnection(noConnection); connectionPresenter.addModel("ConnectionParamsModel", connectionParams); connectionPresenter.startVNCConnection(this, false, null, null); @@ -388,6 +389,10 @@ return; } } + + if (rfb.isTreeManager()) { + rfb.setId((short) rfb.getNewNodeId()); + } cp.sendWhereToConnect(this); isTreeVNC = true; myRfb = rfb;