Author: toad
Date: 2009-03-18 19:26:39 +0000 (Wed, 18 Mar 2009)
New Revision: 26100

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
If we compressed the data, and we are going to use the compressed data, and we 
are told to free the data, then free the original data.


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-03-18 18:28:36 UTC (rev 26099)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-03-18 19:26:39 UTC (rev 26100)
@@ -155,6 +155,12 @@
                        Logger.error(this, "Already cancelled, not starting");
                        return;
                }
+               if(persistent) container.activate(block, 1);
+               if(freeData && output.bestCodec != null) {
+                       block.getData().free();
+                       if(persistent) block.getData().removeFrom(container);
+                       block.nullData();
+               }
                try {
                        onCompressedInner(output, container, context);
                } catch (InsertException e) {

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

Reply via email to