[freenet-cvs] r14799 - in trunk/freenet/src/freenet: clients/http node
Jogy at freenetproject.org
Jogy at freenetproject.org
Mon Aug 20 11:17:46 UTC 2007
Author: Jogy
Date: 2007-08-20 11:17:45 +0000 (Mon, 20 Aug 2007)
New Revision: 14799
Modified:
trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
trunk/freenet/src/freenet/node/PeerNodeStatus.java
Log:
Indicate opennet nodes in the Peer Location Distribution circle with an "o" instead of an "x" which is used for darknet nodes.
Alas, the Node Location Distribution circle is always empty for me (because of networkSizeEstimateSession: 0 nodes?) so no "o" here so far. Also, the code is different (and ugly) for this circle
Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java 2007-08-19 15:36:43 UTC (rev 14798)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java 2007-08-20 11:17:45 UTC (rev 14799)
@@ -878,7 +878,7 @@
} else {
histogramDisconnected[histogramIndex]++;
}
- peerCircleInfoboxContent.addChild("span", new String[] { "style", "class" }, new String[] { generatePeerCircleStyleString(peerLocation, false, (1.0 - peerNodeStatus.getPReject())), ((peerNodeStatus.isConnected())?"connected":"disconnected") }, "x");
+ peerCircleInfoboxContent.addChild("span", new String[] { "style", "class" }, new String[] { generatePeerCircleStyleString(peerLocation, false, (1.0 - peerNodeStatus.getPReject())), ((peerNodeStatus.isConnected())?"connected":"disconnected") }, ((peerNodeStatus.isOpennet())?"o":"x"));
}
peerCircleInfoboxContent.addChild("span", new String[] { "style", "class" }, new String[] { generatePeerCircleStyleString(myLocation, true, 1.0), "me" }, "x");
//
Modified: trunk/freenet/src/freenet/node/PeerNodeStatus.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNodeStatus.java 2007-08-19 15:36:43 UTC (rev 14798)
+++ trunk/freenet/src/freenet/node/PeerNodeStatus.java 2007-08-20 11:17:45 UTC (rev 14799)
@@ -46,6 +46,8 @@
private final boolean isFetchingARK;
+ private final boolean isOpennet;
+
private final double averagePingTime;
private final boolean publicInvalidVersion;
@@ -100,6 +102,7 @@
this.connected = peerNode.isConnected();
this.routable = peerNode.isRoutable();
this.isFetchingARK = peerNode.isFetchingARK();
+ this.isOpennet = peerNode.isOpennet();
this.averagePingTime = peerNode.averagePingTime();
this.publicInvalidVersion = peerNode.publicInvalidVersion();
this.publicReverseInvalidVersion = peerNode.publicReverseInvalidVersion();
@@ -291,6 +294,13 @@
}
/**
+ * @return the isOpennet
+ */
+ public boolean isOpennet() {
+ return isOpennet;
+ }
+
+ /**
* @return the simpleVersion
*/
public String getSimpleVersion() {
More information about the cvs
mailing list