Author: toad
Date: 2006-02-21 02:24:26 +0000 (Tue, 21 Feb 2006)
New Revision: 8077

Modified:
   branches/config/src/freenet/node/Node.java
   branches/config/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
64-bit block number but I think it is back compatible.

Modified: branches/config/src/freenet/node/Node.java
===================================================================
--- branches/config/src/freenet/node/Node.java  2006-02-21 01:33:48 UTC (rev 
8076)
+++ branches/config/src/freenet/node/Node.java  2006-02-21 02:24:26 UTC (rev 
8077)
@@ -701,7 +701,7 @@

         maxStoreKeys = storeSize / sizePerKey;

-        nodeConfig.register("storeDir", new 
File(nodeDir,"store-"+portNumber).toString(), 6, true, "Store directory", "Name 
of directory to put store files in", 
+        nodeConfig.register("storeDir", ".", 6, true, "Store directory", "Name 
of directory to put store files in", 
                        new StringCallback() {
                                        public String get() {
                                                return storeDir.getPath();

Modified: branches/config/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- branches/config/src/freenet/store/BerkeleyDBFreenetStore.java       
2006-02-21 01:33:48 UTC (rev 8076)
+++ branches/config/src/freenet/store/BerkeleyDBFreenetStore.java       
2006-02-21 02:24:26 UTC (rev 8077)
@@ -53,7 +53,7 @@
        private final TupleBinding storeBlockTupleBinding;
        private final TupleBinding longTupleBinding;

-       private long chkBlocksInStore;
+       private int chkBlocksInStore;
        private long maxChkBlocks;
        private final Database chkDB;
        private final Database chkDB_accessTime;
@@ -570,7 +570,7 @@
                return offset;
        }
     }
-        
+    
     /**
      * Convert StoreBlock's to the format used by the database
      */
@@ -585,7 +585,7 @@
        }

        public Object entryToObject(TupleInput ti) {
-               int offset = ti.readInt();
+               long offset = ti.available() == 12 ? ti.readInt() : 
ti.readLong();
                long lastAccessed = ti.readLong();

                StoreBlock storeBlock = new StoreBlock(offset,lastAccessed);


Reply via email to