Author: toad
Date: 2008-02-04 23:49:55 +0000 (Mon, 04 Feb 2008)
New Revision: 17531
Modified:
trunk/freenet/src/freenet/node/FailureTableEntry.java
Log:
FTE fix: Mixed up i and j caused problems (including having the same node in
twice or more).
Modified: trunk/freenet/src/freenet/node/FailureTableEntry.java
===================================================================
--- trunk/freenet/src/freenet/node/FailureTableEntry.java 2008-02-04
23:34:44 UTC (rev 17530)
+++ trunk/freenet/src/freenet/node/FailureTableEntry.java 2008-02-04
23:49:55 UTC (rev 17531)
@@ -117,11 +117,11 @@
PeerNode req = requestors[i];
boolean requestorIncluded = false;
for(int j=0;j<requestorNodes.length;j++) {
- PeerNode got = requestorNodes[i] == null ? null
: (PeerNode) requestorNodes[i].get();
+ PeerNode got = requestorNodes[j] == null ? null
: (PeerNode) requestorNodes[j].get();
// No longer subscribed if they have rebooted,
or expired
- if(got != null && got.getBootID() !=
requestorBootIDs[i] ||
- now - requestorTimes[i] >
MAX_TIME_BETWEEN_REQUEST_AND_OFFER) {
- requestorNodes[i] = null;
+ if(got != null && got.getBootID() !=
requestorBootIDs[j] ||
+ now - requestorTimes[j] >
MAX_TIME_BETWEEN_REQUEST_AND_OFFER) {
+ requestorNodes[j] = null;
got = null;
}
if(got == null)
@@ -209,7 +209,7 @@
PeerNode req = requestedFrom[i];
boolean requestorIncluded = false;
for(int j=0;j<requestedNodes.length;j++) {
- PeerNode got = requestedNodes[i] == null ? null
: (PeerNode) requestedNodes[i].get();
+ PeerNode got = requestedNodes[j] == null ? null
: (PeerNode) requestedNodes[j].get();
if(got == null)
nulls++;
if(got == req) {