Update of /cvsroot/freenet/freenet/src/freenet/fs/dir
In directory sc8-pr-cvs1:/tmp/cvs-serv10578/fs/dir

Modified Files:
        NativeFSDirectory.java 
Log Message:
Cleanup descriptions shown by --config
setExpert on three options someone added without descriptions.
Fix an NPE in the old RandomAccessFilePool
Reimplement RandomAccessFilePool to support OSs that don't limit FDs

Index: NativeFSDirectory.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/fs/dir/NativeFSDirectory.java,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -w -r1.169 -r1.170
--- NativeFSDirectory.java      31 Oct 2003 19:21:22 -0000      1.169
+++ NativeFSDirectory.java      10 Nov 2003 09:48:38 -0000      1.170
@@ -33,6 +33,8 @@
 import freenet.support.Logger;
 import freenet.support.PooledRandomAccessFile;
 import freenet.support.RandomAccessFilePool;
+import freenet.support.RealRandomAccessFilePool;
+import freenet.support.FakeRandomAccessFilePool;
 import freenet.support.ReversibleSortedMap;
 import freenet.support.SkiplistWithHashMap;
 import freenet.support.Walk;
@@ -716,8 +718,9 @@
         this.getFileBuffer.append(rootAsString);
         this.getFileBuffer.append(File.separator);
         this.getFileResetLength = rootAsString.length() + seplen;
-               this.rafpool = new RandomAccessFilePool(maxFilesOpen);
         // FIXME: 64 above.
+        if (maxFilesOpen == 0) this.rafpool = new FakeRandomAccessFilePool();
+            else this.rafpool = new RealRandomAccessFilePool(maxFilesOpen);
         logDEBUG = Core.logger.shouldLog(Logger.DEBUG,this); // FIXME: EVIL
         if(!root.isDirectory() && !root.mkdir())
             throw new IOException("couldn't create native directory: 
"+root.getCanonicalPath());

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to