Skip to content
Permalink
Browse files Browse the repository at this point in the history
disableProbabilisticHTLs does NOT mean don't decrement HTL at all!
(another bug affecting the simulator)

git-svn-id: file:///home/toad/git-migration/temprepository/trunk/freenet@17564 67a373e5-eb02-0410-a15c-ee090a768436
  • Loading branch information
toad committed Feb 5, 2008
1 parent d3b9a93 commit 4aaa08f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/freenet/node/Node.java
Expand Up @@ -2119,11 +2119,11 @@ public short decrementHTL(PeerNode source, short htl) {
if(htl >= maxHTL) htl = maxHTL;
if(htl <= 0) htl = 1;
if(htl == maxHTL) {
if(decrementAtMax && !disableProbabilisticHTLs) htl--;
if(decrementAtMax || disableProbabilisticHTLs) htl--;
return htl;
}
if(htl == 1) {
if(decrementAtMin && !disableProbabilisticHTLs) htl--;
if(decrementAtMin || disableProbabilisticHTLs) htl--;
return htl;
}
return --htl;
Expand Down
4 changes: 2 additions & 2 deletions src/freenet/node/PeerNode.java
Expand Up @@ -1443,12 +1443,12 @@ public short decrementHTL(short htl) {
if(htl <= 0)
htl = 1;
if(htl == max) {
if(decrementHTLAtMaximum && !node.disableProbabilisticHTLs)
if(decrementHTLAtMaximum || node.disableProbabilisticHTLs)
htl--;
return htl;
}
if(htl == 1) {
if(decrementHTLAtMinimum && !node.disableProbabilisticHTLs)
if(decrementHTLAtMinimum || node.disableProbabilisticHTLs)
htl--;
return htl;
}
Expand Down

0 comments on commit 4aaa08f

Please sign in to comment.