Update of /cvsroot/freenet/freenet/src/freenet/support
In directory sc8-pr-cvs1:/tmp/cvs-serv22304/src/freenet/support

Modified Files:
        FileLoggerHook.java 
Log Message:
6368:
Don't forget to call TrailerWriteCallback.closed() when something breaks. We may have 
been leaking trailer send states.
Implement a timeout of 5 minutes in TrailerWriterOutputStream.
Make space usage calculation more pessimistic - assume 1 block of overhead per file.
Apparently, Calendar.MONTH is 0 based but Calendar.DAY_OF_MONTH isn't. Fix.

Index: FileLoggerHook.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/support/FileLoggerHook.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -w -r1.39 -r1.40
--- FileLoggerHook.java 15 Nov 2003 21:11:56 -0000      1.39
+++ FileLoggerHook.java 3 Dec 2003 15:41:16 -0000       1.40
@@ -117,9 +117,12 @@
     }
     
     protected String getHourLogName(Calendar c) {
-       return baseFilename + "-" + c.get(Calendar.YEAR) + "-" + 
pad2(c.get(Calendar.MONTH)) +
-           "-" + pad2(c.get(Calendar.DAY_OF_MONTH)) + "-" + 
pad2(c.get(Calendar.HOUR_OF_DAY)) +
-           (INTERVAL == Calendar.MINUTE ? ("-" + pad2(c.get(Calendar.MINUTE))) : "");
+       return baseFilename + "-" + c.get(Calendar.YEAR) + "-" + 
+               pad2(c.get(Calendar.MONTH)+1) +
+           "-" + pad2(c.get(Calendar.DAY_OF_MONTH)) +
+               "-" + pad2(c.get(Calendar.HOUR_OF_DAY)) +
+           (INTERVAL == Calendar.MINUTE ? ("-" + 
+                                                                        
pad2(c.get(Calendar.MINUTE))) : "");
     }
     
     protected String pad2(int x) {

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

Reply via email to