Author: toad
Date: 2009-02-18 13:17:36 +0000 (Wed, 18 Feb 2009)
New Revision: 25680

Modified:
   branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
Log:
Debugging


Modified: branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java        
2009-02-18 12:56:48 UTC (rev 25679)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java        
2009-02-18 13:17:36 UTC (rev 25680)
@@ -120,7 +120,9 @@
                this.deleteFetchContext = deleteFetchContext;
                if(Logger.shouldLog(Logger.MINOR, this))
                        Logger.minor(this, "Persistence = "+persistent+" from 
"+parent2, new Exception("debug"));
-               this.hashCode = super.hashCode();
+               int hash = super.hashCode();
+               if(hash == 0) hash = 1;
+               this.hashCode = hash;
                this.finished = false;
                this.returnBucket = returnBucket;
                this.fetchContext = newCtx;
@@ -671,4 +673,21 @@
                container.delete(this);
        }
 
+       public boolean objectCanUpdate(ObjectContainer container) {
+               if(hashCode == 0) {
+                       Logger.error(this, "Trying to update with hash 0 => 
already deleted!", new Exception("error"));
+                       return false;
+               }
+               return true;
+       }
+       
+       public boolean objectCanNew(ObjectContainer container) {
+               if(hashCode == 0) {
+                       Logger.error(this, "Trying to write with hash 0 => 
already deleted!", new Exception("error"));
+                       return false;
+               }
+               return true;
+       }
+       
+       
 }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to