Author: dbkr
Date: 2006-07-22 22:10:02 +0000 (Sat, 22 Jul 2006)
New Revision: 9725
Modified:
trunk/freenet/src/freenet/node/Node.java
trunk/freenet/src/freenet/node/Version.java
Log:
892: Fix ARK insertion. Firstly correct the true to a false to not insert the
ARK if there are no detected IP addresses. Secondly, do insert if we don't have
a record of the last one we inserted.
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2006-07-22 21:09:56 UTC (rev
9724)
+++ trunk/freenet/src/freenet/node/Node.java 2006-07-22 22:10:02 UTC (rev
9725)
@@ -193,7 +193,7 @@
private boolean checkIPUpdated() {
if(lastIPAddress == null) {
Logger.minor(this, "Not inserting because no IP
address");
- return true; // no point inserting
+ return false; // no point inserting
}
Peer[] p = getPrimaryIPAddress();
synchronized (this) {
@@ -202,6 +202,9 @@
for(int i=0;i<p.length;i++)
if(!p[i].strictEquals(lastInsertedPeers[i]))
return true;
+ } else {
+ // we've not inserted an ARK that we
know about (ie since startup)
+ return true;
}
}
return false;
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-07-22 21:09:56 UTC (rev
9724)
+++ trunk/freenet/src/freenet/node/Version.java 2006-07-22 22:10:02 UTC (rev
9725)
@@ -18,7 +18,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 891;
+ private static final int buildNumber = 892;
/** Oldest build of Fred we will talk to */
private static final int oldLastGoodBuild = 870;