Author: j16sdiz
Date: 2008-05-04 13:13:58 +0000 (Sun, 04 May 2008)
New Revision: 19739

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
fix isFree() and lockConfig()

isFree() should use read()
lockConfig() should use readFully()


Modified: 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-05-04 13:13:37 UTC (rev 19738)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-05-04 13:13:58 UTC (rev 19739)
@@ -524,7 +524,7 @@
                ByteBuffer bf = ByteBuffer.allocate((int) ENTRY_HEADER_LENGTH);

                do {
-                       int status = storeFC[split].write(bf, rawOffset + 
bf.position());
+                       int status = storeFC[split].read(bf, rawOffset + 
bf.position());
                        if (status == -1)
                                throw new EOFException();
                } while (bf.hasRemaining());
@@ -577,7 +577,7 @@
                        // try to load
                        RandomAccessFile raf = new RandomAccessFile(configFile, 
"r");
                        salt = new byte[0x10];
-                       raf.read(salt);
+                       raf.readFully(salt);

                        storeSize = raf.readLong();
                        prevStoreSize = raf.readLong();


Reply via email to