Author: toad
Date: 2005-12-08 14:22:51 +0000 (Thu, 08 Dec 2005)
New Revision: 7699

Modified:
   trunk/freenet/src/freenet/node/Version.java
   trunk/freenet/src/freenet/support/FileLoggerHook.java
Log:
297: (mandatory)
More testnet fixes.

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2005-12-08 14:01:25 UTC (rev 
7698)
+++ trunk/freenet/src/freenet/node/Version.java 2005-12-08 14:22:51 UTC (rev 
7699)
@@ -20,10 +20,10 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       public static final int buildNumber = 296;
+       public static final int buildNumber = 297;

        /** Oldest build of Fred we will talk to */
-       public static final int lastGoodBuild = 296;
+       public static final int lastGoodBuild = 297;

        /** The highest reported build of fred */
        public static int highestSeenBuild = buildNumber;

Modified: trunk/freenet/src/freenet/support/FileLoggerHook.java
===================================================================
--- trunk/freenet/src/freenet/support/FileLoggerHook.java       2005-12-08 
14:01:25 UTC (rev 7698)
+++ trunk/freenet/src/freenet/support/FileLoggerHook.java       2005-12-08 
14:22:51 UTC (rev 7699)
@@ -193,7 +193,7 @@
                        File currentFilename = null;
                        Object o = null;
                        long thisTime = System.currentTimeMillis();
-                       long lastTime = thisTime;
+                       long lastTime = -1;
                        long startTime = -1;
                        long nextHour = -1;
                        GregorianCalendar gc = null;
@@ -234,6 +234,8 @@
                                }
                                System.err.println("Created log files");
                                startTime = gc.getTimeInMillis();
+                               Logger.minor(this, "Start time: "+gc+" -> 
"+startTime);
+                               lastTime = startTime;
                                gc.add(INTERVAL, INTERVAL_MULTIPLIER);
                                nextHour = gc.getTimeInMillis();
                        }
@@ -258,8 +260,8 @@
                                                        }
                                                        String oldFilename = 
filename;
                                                        long length = 
currentFilename.length();
-                                                       OldLogFile olf = new 
OldLogFile(currentFilename, lastTime, thisTime, length);
-                                                       lastTime = thisTime;
+                                                       OldLogFile olf = new 
OldLogFile(currentFilename, lastTime, nextHour, length);
+                                                       lastTime = nextHour;
                                                        synchronized(logFiles) {
                                                                
logFiles.addLast(olf);
                                                        }
@@ -510,6 +512,7 @@
                                if(nums.length > 5)
                                        gc.set(Calendar.MINUTE, nums[5]);
                                gc.set(Calendar.SECOND, 0);
+                               gc.set(Calendar.MILLISECOND, 0);
                                long startTime = gc.getTimeInMillis();
                                if(oldFile != null) {
                                        long l = oldFile.length();
@@ -866,6 +869,7 @@
                        Iterator i = logFiles.iterator();
                        while(i.hasNext()) {
                                OldLogFile olf = (OldLogFile) i.next();
+                               Logger.minor(this, "Checking "+time+" against 
"+olf.filename+" : start="+olf.start+", end="+olf.end);
                                if(time >= olf.start && time < olf.end) {
                                        toReturn = olf;
                                        Logger.minor(this, "Found "+olf);


Reply via email to