Author: toad
Date: 2008-02-07 23:18:41 +0000 (Thu, 07 Feb 2008)
New Revision: 17684

Modified:
   trunk/freenet/src/freenet/node/FailureTable.java
Log:
Some of these are conditional on enablePerNodeFailureTables or on both.

Modified: trunk/freenet/src/freenet/node/FailureTable.java
===================================================================
--- trunk/freenet/src/freenet/node/FailureTable.java    2008-02-07 22:51:30 UTC 
(rev 17683)
+++ trunk/freenet/src/freenet/node/FailureTable.java    2008-02-07 23:18:41 UTC 
(rev 17684)
@@ -78,7 +78,7 @@
         * @param timeout
         */
        public void onFailed(Key key, PeerNode routedTo, short htl, int 
timeout) {
-               if(!node.enableULPRDataPropagation) return;
+               if(!(node.enableULPRDataPropagation || 
node.enablePerNodeFailureTables)) return;
                long now = System.currentTimeMillis();
                FailureTableEntry entry;
                synchronized(this) {
@@ -96,7 +96,7 @@
        }

        public void onFinalFailure(Key key, PeerNode routedTo, short htl, int 
timeout, PeerNode requestor) {
-               if(!node.enableULPRDataPropagation) return;
+               if(!(node.enableULPRDataPropagation || 
node.enablePerNodeFailureTables)) return;
                long now = System.currentTimeMillis();
                FailureTableEntry entry;
                synchronized(this) {
@@ -220,7 +220,7 @@
         * near future). If there are nodes waiting for it, we will offer it to 
them.
         */
        public void onFound(KeyBlock block) {
-               if(!node.enableULPRDataPropagation) return;
+               if(!(node.enableULPRDataPropagation || 
node.enablePerNodeFailureTables)) return;
                Key key = block.getKey();
                if(key == null) throw new NullPointerException();
                FailureTableEntry entry;
@@ -230,6 +230,7 @@
                        entriesByKey.removeKey(key);
                        blockOfferListByKey.removeKey(key);
                }
+               if(!node.enableULPRDataPropagation) return;
                entry.offer();
        }

@@ -443,12 +444,12 @@

        /** Called when a node disconnects */
        public void onDisconnect(final PeerNode pn) {
-               if(!node.enableULPRDataPropagation) return;
+               if(!(node.enableULPRDataPropagation || 
node.enablePerNodeFailureTables)) return;
                // FIXME do something (off thread if expensive)
        }

        public TimedOutNodesList getTimedOutNodesList(Key key) {
-               if(!node.enableULPRDataPropagation) return null;
+               if(!node.enablePerNodeFailureTables) return null;
                synchronized(this) {
                        return (FailureTableEntry) entriesByKey.get(key);
                }


Reply via email to