From kryptos at freenetproject.org Mon Sep 3 06:21:22 2007 From: kryptos at freenetproject.org (kryptos at freenetproject.org) Date: Mon, 3 Sep 2007 06:21:22 +0000 (UTC) Subject: [freenet-cvs] r14942 - branches/freenet-jfk/devnotes Message-ID: <20070903062122.519B44798C5@freenetproject.org> Author: kryptos Date: 2007-09-03 06:21:21 +0000 (Mon, 03 Sep 2007) New Revision: 14942 Added: branches/freenet-jfk/devnotes/cryptoNotes.txt Removed: branches/freenet-jfk/devnotes/jfkNotes.txt Log: Updated JFK notes Added: branches/freenet-jfk/devnotes/cryptoNotes.txt =================================================================== --- branches/freenet-jfk/devnotes/cryptoNotes.txt (rev 0) +++ branches/freenet-jfk/devnotes/cryptoNotes.txt 2007-09-03 06:21:21 UTC (rev 14942) @@ -0,0 +1,17 @@ +1 Initiator-Responder: +This is a straightforward DiffieHellman exponential along with a random nonce. +The Initiator Nonce serves two purposes;it allows the initiator to use the same exponentials during different sessions while ensuring that the resulting session key will be different,can be used to differentiate between parallel sessions +2 Responder-Initiator: +Responder replies with a signed copy of his own exponential, a random nonce and an authenticator calculated from a transient hash key private to the responder. +3 Initiator-Responder: +Initiator echoes the data sent by the responder including the authenticator. This helps the responder verify the authenticity of the returned data. The authenticator is sufficient defense against forgery; replays, however, could cause considerable computation. The defense against this is to cache the corresponding Message (4); if a duplicate Message (3) is seen, the cached response is retransmitted; The key for looking up Message 3's in the cache is the authenticator; this prevents DoS attacks where the attacker randomly modifies the encrypted +blocks of a valid message, causing a cache miss and thus more processing to be done at the Responder. Rejection messages do not concern us because group information which is sent in Message2 indicates which groups and algorithms are acceptable avoiding the need for explicit message rejection. +4 Responder-Initiator: +Encrypted message of the signature on both nonces, both exponentials using the same keys as in the previous message.The Initiator can verify that the Responder is present and participating in the session, by decrypting the message and verifying the enclosed signature. + +DOS Mitigation +Responder does not keep state on receiving Msg 1 +HMAC is produced/verified by the Responder only +HMAC is used to quickly discard DoS packets +This lookup can done in O(n) using a Patricia trie (Specialized Set data structure based on a prefix tree,they find particular application in the area of IP routing where the ability to contain large ranges of values with a few exceptions is particularly suited to the hierarchical organization of IP Addresses) +Responder (and Initiator) can reuse g^r and g^i, key but material still changes Deleted: branches/freenet-jfk/devnotes/jfkNotes.txt =================================================================== --- branches/freenet-jfk/devnotes/jfkNotes.txt 2007-08-31 17:50:23 UTC (rev 14941) +++ branches/freenet-jfk/devnotes/jfkNotes.txt 2007-09-03 06:21:21 UTC (rev 14942) @@ -1,20 +0,0 @@ -Initiator-Responder: -This is a straightforward DiffieHellman exponential. -The Initiator Nonce serves two purposes;it allows the initiator to use the same -exponentials during different sessions while ensuring that the resulting session key will be different,can be used to differentiate between parallel sessions - -Responder-Initiator: -Responder replies with a signed copy of his own exponential, a random nonce and an authenticator calculated from a transient hash key private to the responder. -We slightly deviate JFK here;we do not send any public key information -as specified in the JFK docs - -Initiator-Responder: -Initiator echoes the data sent by the responder including the authenticator. This helps -the responder verify the authenticity of the returned data. Rejection messages do not -concern us because grpinfo which is sent in Message2 indicates which groups and algorithms -are acceptable avoiding the need for explicit message rejection. - -Responder-Initiator: -Encrypted message of the signature -on both nonces, both exponentials using the same keys as in the previous message - From nextgens at freenetproject.org Mon Sep 3 23:14:44 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Mon, 3 Sep 2007 23:14:44 +0000 (UTC) Subject: [freenet-cvs] r14948 - trunk/freenet/src/freenet/support/io Message-ID: <20070903231444.5EC1B4798FA@freenetproject.org> Author: nextgens Date: 2007-09-03 23:14:44 +0000 (Mon, 03 Sep 2007) New Revision: 14948 Modified: trunk/freenet/src/freenet/support/io/FileUtil.java Log: Resolve a longstanding FIXME in FileUtils.readUTF() Modified: trunk/freenet/src/freenet/support/io/FileUtil.java =================================================================== --- trunk/freenet/src/freenet/support/io/FileUtil.java 2007-09-03 22:50:50 UTC (rev 14947) +++ trunk/freenet/src/freenet/support/io/FileUtil.java 2007-09-03 23:14:44 UTC (rev 14948) @@ -12,7 +12,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; import freenet.client.DefaultMIMETypes; @@ -25,7 +24,7 @@ } /** - * Guesstimate real disk usage for a file with a given filename, of a given length. + * Guess estimate real disk usage for a file with a given filename, of a given length. */ public static long estimateUsage(File file, long flen) { /** @@ -76,33 +75,24 @@ return result; } - // FIXME: this is called readUTF but it reads in the default charset ... eh?? public static String readUTF(File file) throws FileNotFoundException, IOException { - StringBuffer result = new StringBuffer(); FileInputStream fis = null; BufferedInputStream bis = null; - InputStreamReader isr = null; + DataInputStream dis = null; try { fis = new FileInputStream(file); bis = new BufferedInputStream(fis); - isr = new InputStreamReader(bis); + dis = new DataInputStream(bis); - char[] buf = new char[4096]; - int length = 0; - - while((length = isr.read(buf)) > 0) { - result.append(buf, 0, length); - } - + return dis.readUTF(); } finally { try { - if(isr != null) isr.close(); + if(dis != null) dis.close(); if(bis != null) bis.close(); if(fis != null) fis.close(); } catch (IOException e) {} } - return result.toString(); } public static boolean writeTo(InputStream input, File target) throws FileNotFoundException, IOException { From nextgens at freenetproject.org Mon Sep 3 23:15:33 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Mon, 3 Sep 2007 23:15:33 +0000 (UTC) Subject: [freenet-cvs] r14949 - in trunk/freenet/src/freenet: client client/async clients/http io io/comm node node/fcp support support/transport/ip Message-ID: <20070903231533.4766D47996C@freenetproject.org> Author: nextgens Date: 2007-09-03 23:15:32 +0000 (Mon, 03 Sep 2007) New Revision: 14949 Modified: trunk/freenet/src/freenet/client/FECCodec.java trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java trunk/freenet/src/freenet/client/async/SingleFileInserter.java trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java trunk/freenet/src/freenet/io/NetworkInterface.java trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java trunk/freenet/src/freenet/node/CHKInsertSender.java trunk/freenet/src/freenet/node/DNSRequester.java trunk/freenet/src/freenet/node/GlobalProbe.java trunk/freenet/src/freenet/node/IPDetectorPluginManager.java trunk/freenet/src/freenet/node/InsertHandler.java trunk/freenet/src/freenet/node/LocationManager.java trunk/freenet/src/freenet/node/LoggingConfigHandler.java trunk/freenet/src/freenet/node/MemoryChecker.java trunk/freenet/src/freenet/node/NodePinger.java trunk/freenet/src/freenet/node/NodeStarter.java trunk/freenet/src/freenet/node/PacketSender.java trunk/freenet/src/freenet/node/Persister.java trunk/freenet/src/freenet/node/RequestHandler.java trunk/freenet/src/freenet/node/RequestSender.java trunk/freenet/src/freenet/node/RequestStarter.java trunk/freenet/src/freenet/node/SSKInsertHandler.java trunk/freenet/src/freenet/node/SSKInsertSender.java trunk/freenet/src/freenet/node/TestnetHandler.java trunk/freenet/src/freenet/node/TestnetStatusUploader.java trunk/freenet/src/freenet/node/TextModeClientInterface.java trunk/freenet/src/freenet/node/TextModeClientInterfaceServer.java trunk/freenet/src/freenet/node/fcp/FCPConnectionInputHandler.java trunk/freenet/src/freenet/node/fcp/FCPConnectionOutputHandler.java trunk/freenet/src/freenet/node/fcp/FCPServer.java trunk/freenet/src/freenet/support/Logger.java trunk/freenet/src/freenet/support/OSThread.java trunk/freenet/src/freenet/support/transport/ip/IPAddressDetector.java Log: Make OSThread a static class Modified: trunk/freenet/src/freenet/client/FECCodec.java =================================================================== --- trunk/freenet/src/freenet/client/FECCodec.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/client/FECCodec.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -373,7 +373,7 @@ private static class FECRunner implements Runnable { public void run(){ - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); try { while(true){ FECJob job = null; Modified: trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java =================================================================== --- trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -45,7 +45,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); while(true) { SingleBlockInserter sbi = null; synchronized(this) { Modified: trunk/freenet/src/freenet/client/async/SingleFileInserter.java =================================================================== --- trunk/freenet/src/freenet/client/async/SingleFileInserter.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/client/async/SingleFileInserter.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -114,7 +114,7 @@ private class OffThreadCompressor implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); try { tryCompress(); } catch (InsertException e) { Modified: trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java =================================================================== --- trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -425,7 +425,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); boolean logMINOR = Logger.shouldLog(Logger.MINOR, this); if(logMINOR) Logger.minor(this, "Handling connection"); try { Modified: trunk/freenet/src/freenet/io/NetworkInterface.java =================================================================== --- trunk/freenet/src/freenet/io/NetworkInterface.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/io/NetworkInterface.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -277,7 +277,7 @@ * @see NetworkInterface#allowedHosts */ public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); while (!closed) { boolean logMINOR = Logger.shouldLog(Logger.MINOR, this); try { Modified: trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java =================================================================== --- trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -274,7 +274,7 @@ public class USMChecker implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); while(true) { if(_isDone) return; // don't synchronize because don't want to deadlock - this is our recovery mechanism logMINOR = Logger.shouldLog(Logger.MINOR, UdpSocketHandler.this); Modified: trunk/freenet/src/freenet/node/CHKInsertSender.java =================================================================== --- trunk/freenet/src/freenet/node/CHKInsertSender.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/CHKInsertSender.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -37,7 +37,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); try { bt.send(executor); if(bt.failedDueToOverload()) { @@ -200,7 +200,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); short origHTL; synchronized (this) { origHTL = htl; @@ -639,7 +639,7 @@ private class CompletionWaiter implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); if(logMINOR) Logger.minor(this, "Starting "+this); // Wait for the request to reach a terminal stage. Modified: trunk/freenet/src/freenet/node/DNSRequester.java =================================================================== --- trunk/freenet/src/freenet/node/DNSRequester.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/DNSRequester.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -30,7 +30,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); while(true) { try { realRun(); Modified: trunk/freenet/src/freenet/node/GlobalProbe.java =================================================================== --- trunk/freenet/src/freenet/node/GlobalProbe.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/GlobalProbe.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -39,7 +39,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); synchronized(this) { lastLocation = 0.0; double prevLoc = lastLocation; Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java =================================================================== --- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -152,7 +152,7 @@ } node.getTicker().queueTimedJob(new Runnable() { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); tryMaybeRun(); } }, 60*1000); @@ -476,7 +476,7 @@ public class DetectorRunner implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); try { realRun(); } catch (OutOfMemoryError e) { Modified: trunk/freenet/src/freenet/node/InsertHandler.java =================================================================== --- trunk/freenet/src/freenet/node/InsertHandler.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/InsertHandler.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -71,7 +71,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); try { realRun(); } catch (OutOfMemoryError e) { @@ -401,7 +401,7 @@ public class DataReceiver implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); synchronized(this) { receiveStarted = true; } Modified: trunk/freenet/src/freenet/node/LocationManager.java =================================================================== --- trunk/freenet/src/freenet/node/LocationManager.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/LocationManager.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -144,7 +144,7 @@ public class SwapRequestSender implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); while(true) { try { long startTime = System.currentTimeMillis(); @@ -245,7 +245,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); MessageDigest md = SHA256.getMessageDigest(); boolean reachedEnd = false; @@ -403,7 +403,7 @@ RecentlyForwardedItem item; public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); long uid = r.nextLong(); if(!lock()) return; boolean reachedEnd = false; Modified: trunk/freenet/src/freenet/node/LoggingConfigHandler.java =================================================================== --- trunk/freenet/src/freenet/node/LoggingConfigHandler.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/LoggingConfigHandler.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -302,7 +302,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); fileLoggerHook.waitForSwitch(); delete(logDir); } Modified: trunk/freenet/src/freenet/node/MemoryChecker.java =================================================================== --- trunk/freenet/src/freenet/node/MemoryChecker.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/MemoryChecker.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -32,7 +32,7 @@ } public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); if(!goon){ Logger.normal(this, "Goon is false ; killing MemoryChecker"); return; Modified: trunk/freenet/src/freenet/node/NodePinger.java =================================================================== --- trunk/freenet/src/freenet/node/NodePinger.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/NodePinger.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -32,7 +32,7 @@ final Node node; public void run() { - //freenet.support.OSThread.logPID(this); + //freenet.support.OSThread.RealOSThread.logPID(this); try { recalculateMean(node.peers.connectedPeers); } finally { Modified: trunk/freenet/src/freenet/node/NodeStarter.java =================================================================== --- trunk/freenet/src/freenet/node/NodeStarter.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/NodeStarter.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -30,8 +30,7 @@ * A class to tie the wrapper and the node (needed for self-restarting support) * */ -public class NodeStarter - implements WrapperListener +public class NodeStarter implements WrapperListener { private Node node; private static LoggingConfigHandler logConfigHandler; Modified: trunk/freenet/src/freenet/node/PacketSender.java =================================================================== --- trunk/freenet/src/freenet/node/PacketSender.java 2007-09-03 23:14:44 UTC (rev 14948) +++ trunk/freenet/src/freenet/node/PacketSender.java 2007-09-03 23:15:32 UTC (rev 14949) @@ -70,7 +70,7 @@ private class Watchdog implements Runnable { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); // Do not lock anything, or we may be caught up with a lost-lock deadlock. while(true) { try { @@ -121,7 +121,7 @@ if(now < transition) { queueTimedJob(new Runnable() { public void run() { - freenet.support.OSThread.logPID(this); + freenet.support.Logger.OSThread.logPID(this); PeerNode[] nodes = node.peers.myPeers; for(int i=0;i Author: nextgens Date: 2007-09-03 23:16:23 +0000 (Mon, 03 Sep 2007) New Revision: 14950 Modified: trunk/freenet/src/freenet/l10n/L10n.java Log: update some comments in L10n Modified: trunk/freenet/src/freenet/l10n/L10n.java =================================================================== --- trunk/freenet/src/freenet/l10n/L10n.java 2007-09-03 23:15:32 UTC (rev 14949) +++ trunk/freenet/src/freenet/l10n/L10n.java 2007-09-03 23:16:23 UTC (rev 14950) @@ -21,9 +21,7 @@ * * @author Florent Daignière <nextgens at freenetproject.org> * -* TODO: Maybe we ought to use the locale to set the default language. * TODO: Maybe base64 the override file ? -* TODO: Add support for "custom", unknown languages ? * * comment(mario): for www interface we might detect locale from http requests? * for other access (telnet) using system locale would probably be good, but From nextgens at freenetproject.org Mon Sep 3 23:17:04 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Mon, 3 Sep 2007 23:17:04 +0000 (UTC) Subject: [freenet-cvs] r14951 - trunk/freenet/src/freenet/clients/http Message-ID: <20070903231704.CF11147996C@freenetproject.org> Author: nextgens Date: 2007-09-03 23:17:04 +0000 (Mon, 03 Sep 2007) New Revision: 14951 Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java Log: Grab logs using the appropriate method in FileUtils Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java =================================================================== --- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java 2007-09-03 23:16:23 UTC (rev 14950) +++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java 2007-09-03 23:17:04 UTC (rev 14951) @@ -8,8 +8,6 @@ import java.net.URISyntaxException; import java.io.File; -import java.io.FileReader; -import java.io.StringWriter; import org.tanukisoftware.wrapper.WrapperManager; @@ -34,6 +32,7 @@ import freenet.support.MultiValueTable; import freenet.support.api.Bucket; import freenet.support.api.HTTPRequest; +import freenet.support.io.FileUtil; import freenet.frost.message.*; @@ -404,16 +403,9 @@ if(ctx.isAllowedFullAccess()) { if(request.isParameterSet("latestlog")) { - - FileReader reader = new FileReader(node.config.get("logger").getString("dirname") + File.separator + "freenet-latest.log"); - - StringWriter sw = new StringWriter(); - char[] buffer = new char[1024]; - int read; - while((read = reader.read(buffer)) != -1) - sw.write(buffer, 0, read); - - this.writeHTMLReply(ctx, 200, "OK", sw.toString()); + final File logs = new File(node.config.get("logger").getString("dirname") + File.separator + "freenet-latest.log"); + + this.writeHTMLReply(ctx, 200, "OK", FileUtil.readUTF(logs)); return; } else if (request.isParameterSet("terminated")) { if((!request.isParameterSet("formPassword")) || !request.getParam("formPassword").equals(core.formPassword)) { @@ -442,19 +434,19 @@ writeHTMLReply(ctx, 200, "OK", pageNode.generate()); Logger.normal(this, "Node is restarting"); return; - } else if (request.getParam("newbookmark").length() > 0) { + } else if (request.getParam("newbookmark").length() > 0) { HTMLNode pageNode = ctx.getPageMaker().getPageNode(l10n("confirmAddBookmarkTitle"), ctx); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox(l10n("confirmAddBookmarkSubTitle"))); HTMLNode addForm = ctx.addFormChild(ctx.getPageMaker().getContentNode(infobox), "/bookmarkEditor/", "editBookmarkForm"); addForm.addChild("#", l10n("confirmAddBookmarkWithKey", "key", request.getParam("newbookmark"))); addForm.addChild("br"); - String key = request.getParam("newbookmark"); - if(key.startsWith("freenet:")) - key = key.substring(8); + String key = request.getParam("newbookmark"); + if(key.startsWith("freenet:")) + key = key.substring(8); addForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "key", key}); addForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "text", "name", request.getParam("desc") }); - addForm.addChild("input", new String[] {"type", "name", "value"}, new String[] {"hidden", "bookmark", "/"}); + addForm.addChild("input", new String[] {"type", "name", "value"}, new String[] {"hidden", "bookmark", "/"}); addForm.addChild("input", new String[] {"type", "name", "value"}, new String[] {"hidden", "action", "addItem"}); addForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "addbookmark", L10n.getString("BookmarkEditorToadlet.addBookmark") }); this.writeHTMLReply(ctx, 200, "OK", pageNode.generate()); From nextgens at freenetproject.org Mon Sep 3 23:18:43 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Mon, 3 Sep 2007 23:18:43 +0000 (UTC) Subject: [freenet-cvs] r14952 - trunk/freenet/src/freenet/node/fcp Message-ID: <20070903231843.556A5479EDD@freenetproject.org> Author: nextgens Date: 2007-09-03 23:18:43 +0000 (Mon, 03 Sep 2007) New Revision: 14952 Modified: trunk/freenet/src/freenet/node/fcp/AllDataMessage.java trunk/freenet/src/freenet/node/fcp/ClientGet.java trunk/freenet/src/freenet/node/fcp/ClientPutBase.java trunk/freenet/src/freenet/node/fcp/ClientRequest.java trunk/freenet/src/freenet/node/fcp/PutSuccessfulMessage.java Log: Improve the client layer: add both a start and a stop timestamp to requests; Export it on some FCP messages... maybe I forgot places where it would have been usefull (I didn't have the spec handy) Modified: trunk/freenet/src/freenet/node/fcp/AllDataMessage.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/AllDataMessage.java 2007-09-03 23:17:04 UTC (rev 14951) +++ trunk/freenet/src/freenet/node/fcp/AllDataMessage.java 2007-09-03 23:18:43 UTC (rev 14952) @@ -17,12 +17,15 @@ final long dataLength; final boolean global; final String identifier; + final String startupTime, completionTime; - public AllDataMessage(Bucket bucket, String identifier, boolean global) { + public AllDataMessage(Bucket bucket, String identifier, boolean global, long startupTime, long completionTime) { this.bucket = bucket; this.dataLength = bucket.size(); this.identifier = identifier; this.global = global; + this.startupTime = String.valueOf(startupTime); + this.completionTime = String.valueOf(completionTime); } long dataLength() { @@ -34,6 +37,8 @@ fs.putSingle("DataLength", Long.toString(dataLength)); fs.putSingle("Identifier", identifier); if(global) fs.putSingle("Global", "true"); + fs.putSingle("StartuptTime", startupTime); + fs.putSingle("CompletionTime", completionTime); return fs; } Modified: trunk/freenet/src/freenet/node/fcp/ClientGet.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/ClientGet.java 2007-09-03 23:17:04 UTC (rev 14951) +++ trunk/freenet/src/freenet/node/fcp/ClientGet.java 2007-09-03 23:18:43 UTC (rev 14952) @@ -310,7 +310,7 @@ if(finished){ if(succeeded) - allDataPending = new AllDataMessage(returnBucket, identifier, global); + allDataPending = new AllDataMessage(returnBucket, identifier, global, startupTime, completionTime); else started = true; } @@ -384,7 +384,9 @@ if(returnType == ClientGetMessage.RETURN_TYPE_DIRECT) { // Send all the data at once // FIXME there should be other options - adm = new AllDataMessage(returnBucket, identifier, global); + // FIXME: CompletionTime is set on finish() : we need to give it current time here + // but it means we won't always return the same value to clients... Does it matter ? + adm = new AllDataMessage(returnBucket, identifier, global, startupTime, System.currentTimeMillis()); if(persistenceType == PERSIST_CONNECTION) adm.setFreeOnSent(); dontFree = true; @@ -594,6 +596,10 @@ } fs.putSingle("Global", Boolean.toString(client.isGlobalQueue)); fs.put("BinaryBlob", binaryBlob); + fs.put("StartupTime", startupTime); + if(finished) + fs.put("CompletionTime", completionTime); + return fs; } Modified: trunk/freenet/src/freenet/node/fcp/ClientPutBase.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/ClientPutBase.java 2007-09-03 23:17:04 UTC (rev 14951) +++ trunk/freenet/src/freenet/node/fcp/ClientPutBase.java 2007-09-03 23:18:43 UTC (rev 14952) @@ -221,7 +221,7 @@ FCPMessage msg; synchronized (this) { if(succeeded) { - msg = new PutSuccessfulMessage(identifier, global, generatedURI); + msg = new PutSuccessfulMessage(identifier, global, generatedURI, startupTime, completionTime); } else { msg = putFailedMessage; } @@ -306,6 +306,10 @@ // Should have a putFailedMessage... unless there is a race condition. fs.put("PutFailed", putFailedMessage.getFieldSet(false)); fs.putSingle("Global", Boolean.toString(client.isGlobalQueue)); + fs.put("StartupTime", startupTime); + if(finished) + fs.put("CompletionTime", completionTime); + return fs; } Modified: trunk/freenet/src/freenet/node/fcp/ClientRequest.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/ClientRequest.java 2007-09-03 23:17:04 UTC (rev 14951) +++ trunk/freenet/src/freenet/node/fcp/ClientRequest.java 2007-09-03 23:18:43 UTC (rev 14952) @@ -37,6 +37,10 @@ protected String clientToken; /** Is the request on the global queue? */ protected final boolean global; + /** Timestamp : startup time */ + protected final long startupTime; + /** Timestamp : completion time */ + protected long completionTime = Long.MAX_VALUE; public ClientRequest(FreenetURI uri2, String identifier2, int verbosity2, FCPConnectionHandler handler, FCPClient client, short priorityClass2, short persistenceType2, String clientToken2, boolean global) { @@ -56,6 +60,7 @@ else origHandler = null; this.client = client; + this.startupTime = System.currentTimeMillis(); } public ClientRequest(FreenetURI uri2, String identifier2, int verbosity2, FCPConnectionHandler handler, @@ -80,6 +85,7 @@ } else { client = handler.getClient(); } + this.startupTime = System.currentTimeMillis(); } public ClientRequest(SimpleFieldSet fs, FCPClient client2) throws MalformedURLException { @@ -98,6 +104,11 @@ clientToken = fs.get("ClientToken"); finished = Fields.stringToBool(fs.get("Finished"), false); global = Fields.stringToBool(fs.get("Global"), false); + final String stime = fs.get("StartupTime"); + this.startupTime = stime == null ? System.currentTimeMillis() : Fields.parseLong(stime); + final String ctime = fs.get("CompletionTime"); + if(ctime != null) + completionTime = Fields.parseLong(ctime); } /** Lost connection */ @@ -229,6 +240,7 @@ /** Request completed. But we may have to stick around until we are acked. */ protected void finish() { + completionTime = System.currentTimeMillis(); if(persistenceType == ClientRequest.PERSIST_CONNECTION) origHandler.finishedClientRequest(this); else Modified: trunk/freenet/src/freenet/node/fcp/PutSuccessfulMessage.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/PutSuccessfulMessage.java 2007-09-03 23:17:04 UTC (rev 14951) +++ trunk/freenet/src/freenet/node/fcp/PutSuccessfulMessage.java 2007-09-03 23:18:43 UTC (rev 14952) @@ -12,11 +12,14 @@ public final String identifier; public final boolean global; public final FreenetURI uri; + public final String startupTime, completionTime; - public PutSuccessfulMessage(String identifier, boolean global, FreenetURI uri) { + public PutSuccessfulMessage(String identifier, boolean global, FreenetURI uri, long startupTime, long completionTime) { this.identifier = identifier; this.global = global; this.uri = uri; + this.startupTime = String.valueOf(startupTime); + this.completionTime = String.valueOf(completionTime); } public SimpleFieldSet getFieldSet() { @@ -26,6 +29,8 @@ // FIXME debug and remove! if(uri != null) fs.putSingle("URI", uri.toString()); + fs.putSingle("StartuptTime", startupTime); + fs.putSingle("CompletionTime", completionTime); return fs; } From nextgens at freenetproject.org Mon Sep 3 23:19:14 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Mon, 3 Sep 2007 23:19:14 +0000 (UTC) Subject: [freenet-cvs] r14953 - trunk/freenet/src/freenet/node/fcp Message-ID: <20070903231914.925B7479EDD@freenetproject.org> Author: nextgens Date: 2007-09-03 23:19:14 +0000 (Mon, 03 Sep 2007) New Revision: 14953 Modified: trunk/freenet/src/freenet/node/fcp/ClientGet.java trunk/freenet/src/freenet/node/fcp/ClientPutBase.java trunk/freenet/src/freenet/node/fcp/ClientRequest.java Log: indent Modified: trunk/freenet/src/freenet/node/fcp/ClientGet.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/ClientGet.java 2007-09-03 23:18:43 UTC (rev 14952) +++ trunk/freenet/src/freenet/node/fcp/ClientGet.java 2007-09-03 23:19:14 UTC (rev 14953) @@ -77,7 +77,7 @@ File returnFilename, File returnTempFilename) throws IdentifierCollisionException, NotAllowedException { super(uri, identifier, verbosity, null, globalClient, prioClass, (persistRebootOnly ? ClientRequest.PERSIST_REBOOT : ClientRequest.PERSIST_FOREVER), - null, true); + null, true); fctx = new FetchContext(client.defaultFetchContext, FetchContext.IDENTICAL_MASK, false); fctx.eventProducer.addEventListener(this); @@ -124,11 +124,11 @@ ret.free(); throw e; } - getter = new ClientGetter(this, client.core.requestStarters.chkFetchScheduler, client.core.requestStarters.sskFetchScheduler, uri, fctx, priorityClass, client.lowLevelClient, returnBucket, null); - if(persistenceType != PERSIST_CONNECTION) { - FCPMessage msg = persistentTagMessage(); - client.queueClientRequestMessage(msg, 0); - } + getter = new ClientGetter(this, client.core.requestStarters.chkFetchScheduler, client.core.requestStarters.sskFetchScheduler, uri, fctx, priorityClass, client.lowLevelClient, returnBucket, null); + if(persistenceType != PERSIST_CONNECTION) { + FCPMessage msg = persistentTagMessage(); + client.queueClientRequestMessage(msg, 0); + } } public ClientGet(FCPConnectionHandler handler, ClientGetMessage message) throws IdentifierCollisionException, MessageInvalidException { @@ -147,12 +147,12 @@ // Has already been checked fctx.maxOutputLength = message.maxSize; fctx.maxTempLength = message.maxTempSize; - + if(message.allowedMIMETypes != null) { fctx.allowedMIMETypes = new HashSet(); for(int i=0;i= 0 && newPriorityClass != priorityClass) { - this.priorityClass = newPriorityClass; - getClientRequest().setPriorityClass(priorityClass); - priorityClassChanged = true; - } + if(newClientToken != null) { + if( clientToken != null ) { + if( !newClientToken.equals(clientToken) ) { + this.clientToken = newClientToken; // token changed + clientTokenChanged = true; + } + } else { + this.clientToken = newClientToken; // first time the token is set + clientTokenChanged = true; + } + } - if( clientTokenChanged || priorityClassChanged ) { - if(persistenceType != ClientRequest.PERSIST_CONNECTION) { - if(client != null) { - client.server.forceStorePersistentRequests(); - } - } - } else { - return; // quick return, nothing was changed - } + if(newPriorityClass >= 0 && newPriorityClass != priorityClass) { + this.priorityClass = newPriorityClass; + getClientRequest().setPriorityClass(priorityClass); + priorityClassChanged = true; + } - // this could become too complex with more parameters, but for now its ok - final PersistentRequestModifiedMessage modifiedMsg; - if( clientTokenChanged && priorityClassChanged ) { - modifiedMsg = new PersistentRequestModifiedMessage(identifier, global, priorityClass, clientToken); - } else if( priorityClassChanged ) { - modifiedMsg = new PersistentRequestModifiedMessage(identifier, global, priorityClass); - } else if( clientTokenChanged ) { - modifiedMsg = new PersistentRequestModifiedMessage(identifier, global, clientToken); - } else { - return; // paranoia, we should not be here if nothing was changed! - } - client.queueClientRequestMessage(modifiedMsg, 0); - } + if( clientTokenChanged || priorityClassChanged ) { + if(persistenceType != ClientRequest.PERSIST_CONNECTION) { + if(client != null) { + client.server.forceStorePersistentRequests(); + } + } + } else { + return; // quick return, nothing was changed + } - /** - * Called after a RemovePersistentRequest. Send a PersistentRequestRemoved to the clients. - */ - public abstract void requestWasRemoved(); - + // this could become too complex with more parameters, but for now its ok + final PersistentRequestModifiedMessage modifiedMsg; + if( clientTokenChanged && priorityClassChanged ) { + modifiedMsg = new PersistentRequestModifiedMessage(identifier, global, priorityClass, clientToken); + } else if( priorityClassChanged ) { + modifiedMsg = new PersistentRequestModifiedMessage(identifier, global, priorityClass); + } else if( clientTokenChanged ) { + modifiedMsg = new PersistentRequestModifiedMessage(identifier, global, clientToken); + } else { + return; // paranoia, we should not be here if nothing was changed! + } + client.queueClientRequestMessage(modifiedMsg, 0); + } + + /** + * Called after a RemovePersistentRequest. Send a PersistentRequestRemoved to the clients. + */ + public abstract void requestWasRemoved(); + /** Utility method for storing details of a possibly encrypted bucket. */ protected void bucketToFS(SimpleFieldSet fs, String name, boolean includeSize, Bucket data) { SerializableToFieldSetBucket bucket = (SerializableToFieldSetBucket) data; From nextgens at freenetproject.org Tue Sep 4 09:21:51 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 09:21:51 +0000 (UTC) Subject: [freenet-cvs] r14957 - trunk/freenet/src/freenet/support/CPUInformation Message-ID: <20070904092151.BCADB47A692@freenetproject.org> Author: nextgens Date: 2007-09-04 09:21:51 +0000 (Tue, 04 Sep 2007) New Revision: 14957 Modified: trunk/freenet/src/freenet/support/CPUInformation/CPUID.java Log: Resolve 74: Update CPUID - thanks to bobbie sanford ... I forgot about his patch :$ Modified: trunk/freenet/src/freenet/support/CPUInformation/CPUID.java =================================================================== --- trunk/freenet/src/freenet/support/CPUInformation/CPUID.java 2007-09-03 23:57:49 UTC (rev 14956) +++ trunk/freenet/src/freenet/support/CPUInformation/CPUID.java 2007-09-04 09:21:51 UTC (rev 14957) @@ -233,15 +233,26 @@ return "Athlon (Barton)"; } } - if(getCPUFamily() == 15){ - if(getCPUExtendedFamily() == 0){ + if(getCPUFamily() == 15){ // Must check Extended Family + if(getCPUExtendedFamily() == 0){ AMD K8 + // Tgis just tells us socket type and chip die technology + // see BrandID both the ID and NN portions + // If you need to determine a specific chip brand switch(getCPUModel()){ case 4: return "Athlon 64"; case 5: return "Athlon 64 FX Opteron"; + case 7: + return "Athlon 64 (0.13 um 939)"; + case 8: + return "Athlon 64 (0.13 um 754)"; + case 11: + return "Athlon 64 (0.13 um 939)"; case 12: - return "AMD Athlon(tm) 64 Processor 3000+"; + return "Athlon 64 (0.13 um 754)"; + case 15: + return "Athlon 64 (0.13 um 939)"; } } } @@ -373,6 +384,7 @@ System.out.println("**CPUInfo**"); System.out.println("CPU Vendor: " + getCPUVendorID()); System.out.println("CPU Family: " + getCPUFamily()); + System.out.println("CPU Extended Family: " + getCPUExtendedFamily()); System.out.println("CPU Model: " + getCPUModel()); System.out.println("CPU Stepping: " + getCPUStepping()); System.out.println("CPU Flags: " + getCPUFlags()); From nextgens at freenetproject.org Tue Sep 4 09:26:22 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 09:26:22 +0000 (UTC) Subject: [freenet-cvs] r14958 - trunk/freenet/src/freenet/support/CPUInformation Message-ID: <20070904092622.3640D47A6A6@freenetproject.org> Author: nextgens Date: 2007-09-04 09:26:22 +0000 (Tue, 04 Sep 2007) New Revision: 14958 Modified: trunk/freenet/src/freenet/support/CPUInformation/CPUID.java Log: doh Modified: trunk/freenet/src/freenet/support/CPUInformation/CPUID.java =================================================================== --- trunk/freenet/src/freenet/support/CPUInformation/CPUID.java 2007-09-04 09:21:51 UTC (rev 14957) +++ trunk/freenet/src/freenet/support/CPUInformation/CPUID.java 2007-09-04 09:26:22 UTC (rev 14958) @@ -234,8 +234,8 @@ } } if(getCPUFamily() == 15){ // Must check Extended Family - if(getCPUExtendedFamily() == 0){ AMD K8 - // Tgis just tells us socket type and chip die technology + if(getCPUExtendedFamily() == 0){ // AMD K8 + // This just tells us socket type and chip die technology // see BrandID both the ID and NN portions // If you need to determine a specific chip brand switch(getCPUModel()){ From nextgens at freenetproject.org Tue Sep 4 13:22:36 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 13:22:36 +0000 (UTC) Subject: [freenet-cvs] r14959 - trunk/freenet/.settings Message-ID: <20070904132236.93F4747A0EF@freenetproject.org> Author: nextgens Date: 2007-09-04 13:22:36 +0000 (Tue, 04 Sep 2007) New Revision: 14959 Modified: trunk/freenet/.settings/org.eclipse.core.resources.prefs Log: Tell eclipse that the whole project uses UTF-8 encoding. Modified: trunk/freenet/.settings/org.eclipse.core.resources.prefs =================================================================== --- trunk/freenet/.settings/org.eclipse.core.resources.prefs 2007-09-04 09:26:22 UTC (rev 14958) +++ trunk/freenet/.settings/org.eclipse.core.resources.prefs 2007-09-04 13:22:36 UTC (rev 14959) @@ -1,11 +1,3 @@ -#Fri Jul 27 18:21:13 BST 2007 +#Tue Sep 04 15:20:10 CEST 2007 eclipse.preferences.version=1 -encoding//src/freenet/l10n/freenet.l10n.de.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.en.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.fr.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.it.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.no.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.pl.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.se.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.es.properties=UTF-8 -encoding//src/freenet/l10n/freenet.l10n.unlisted.properties=UTF-8 +encoding/=UTF-8 From nextgens at freenetproject.org Tue Sep 4 13:54:08 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 13:54:08 +0000 (UTC) Subject: [freenet-cvs] r14960 - trunk/freenet/src/freenet/node Message-ID: <20070904135408.26E2B4797F9@freenetproject.org> Author: nextgens Date: 2007-09-04 13:54:07 +0000 (Tue, 04 Sep 2007) New Revision: 14960 Modified: trunk/freenet/src/freenet/node/Node.java Log: Fix a l10n key problem Modified: trunk/freenet/src/freenet/node/Node.java =================================================================== --- trunk/freenet/src/freenet/node/Node.java 2007-09-04 13:22:36 UTC (rev 14959) +++ trunk/freenet/src/freenet/node/Node.java 2007-09-04 13:54:07 UTC (rev 14960) @@ -839,7 +839,7 @@ } // Name - nodeConfig.register("name", myName, sortOrder++, false, true, "Node.nodeName", "Node.nodeNameLong", + nodeConfig.register("name", myName, sortOrder++, false, true, "MeaningfulNodeNameUserAlert.noNodeNickTitle", "MeaningfulNodeNameUserAlert.noNodeNick", new NodeNameCallback(this)); myName = nodeConfig.getString("name"); From nextgens at freenetproject.org Tue Sep 4 14:00:14 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 14:00:14 +0000 (UTC) Subject: [freenet-cvs] r14961 - trunk/freenet/src/freenet/clients/http Message-ID: <20070904140014.E011F47A69C@freenetproject.org> Author: nextgens Date: 2007-09-04 14:00:14 +0000 (Tue, 04 Sep 2007) New Revision: 14961 Modified: trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java Log: Maybe fix #1595: Node name given during the wizard needs to be confirmed Modified: trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java =================================================================== --- trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java 2007-09-04 13:54:07 UTC (rev 14960) +++ trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java 2007-09-04 14:00:14 UTC (rev 14961) @@ -251,11 +251,13 @@ super.writeTemporaryRedirect(ctx, "step1", TOADLET_URL+"?step=2"); return; } else if(request.isPartSet("nnameF")) { - String selectedNName = request.getPartAsString("nname", 255); + String selectedNName = request.getPartAsString("nname", 128); try { config.get("node").set("name", selectedNName); - Logger.normal(this, "The node name has been set to "+ selectedNName); + // We call the callback once again to ensure MeaningfulNodeNameUserAlert + // has been unregistered ... see #1595 + Logger.normal(this, "The node name has been set to "+ config.get("node.name")); } catch (InvalidConfigValueException e) { Logger.error(this, "Should not happen, please report!" + e); } From toad at freenetproject.org Tue Sep 4 16:33:44 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Tue, 4 Sep 2007 16:33:44 +0000 (UTC) Subject: [freenet-cvs] r14962 - trunk/freenet/src/freenet/support Message-ID: <20070904163344.2B8B347AA6B@freenetproject.org> Author: toad Date: 2007-09-04 16:33:43 +0000 (Tue, 04 Sep 2007) New Revision: 14962 Modified: trunk/freenet/src/freenet/support/Logger.java Log: Move comment back to where it should be Modified: trunk/freenet/src/freenet/support/Logger.java =================================================================== --- trunk/freenet/src/freenet/support/Logger.java 2007-09-04 14:00:14 UTC (rev 14961) +++ trunk/freenet/src/freenet/support/Logger.java 2007-09-04 16:33:43 UTC (rev 14962) @@ -15,8 +15,6 @@ */ public abstract class Logger { - /** These indicate the verbosity levels for calls to log() * */ - public final static class OSThread { public static boolean getPIDEnabled = false; @@ -193,6 +191,8 @@ } } + /** These indicate the verbosity levels for calls to log() * */ + /** This message indicates an error which prevents correct functionality* */ public static final int ERROR = 16; From toad at freenetproject.org Tue Sep 4 17:08:38 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Tue, 4 Sep 2007 17:08:38 +0000 (UTC) Subject: [freenet-cvs] r14963 - in trunk: freenet/src/freenet/client/async freenet/src/freenet/io/comm freenet/src/freenet/node freenet/src/freenet/node/fcp plugins/XMLLibrarian plugins/XMLSpider Message-ID: <20070904170838.21BA147AED8@freenetproject.org> Author: toad Date: 2007-09-04 17:08:37 +0000 (Tue, 04 Sep 2007) New Revision: 14963 Modified: trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java trunk/freenet/src/freenet/node/TextModeClientInterface.java trunk/freenet/src/freenet/node/fcp/ClientPut.java trunk/plugins/XMLLibrarian/XMLLibrarian.java trunk/plugins/XMLSpider/XMLSpider.java Log: Fix a few InputStream leaks. Modified: trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java =================================================================== --- trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java 2007-09-04 16:33:43 UTC (rev 14962) +++ trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java 2007-09-04 17:08:37 UTC (rev 14963) @@ -47,6 +47,8 @@ BinaryBlob.readBinaryBlob(dis, blocks, tolerant); + dis.close(); + Vector myInserters = new Vector(); Iterator i = blocks.keys().iterator(); Modified: trunk/freenet/src/freenet/node/TextModeClientInterface.java =================================================================== --- trunk/freenet/src/freenet/node/TextModeClientInterface.java 2007-09-04 16:33:43 UTC (rev 14962) +++ trunk/freenet/src/freenet/node/TextModeClientInterface.java 2007-09-04 17:08:37 UTC (rev 14963) @@ -359,6 +359,7 @@ while(bis.available() > 0){ outsb.append((char)bis.read()); } + bis.close(); output.data.free(); } catch (IOException e) { outsb.append("Bucket error?: " + e.getMessage()); Modified: trunk/freenet/src/freenet/node/fcp/ClientPut.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/ClientPut.java 2007-09-04 16:33:43 UTC (rev 14962) +++ trunk/freenet/src/freenet/node/fcp/ClientPut.java 2007-09-04 17:08:37 UTC (rev 14963) @@ -6,6 +6,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.security.MessageDigest; @@ -231,7 +232,9 @@ md.update(salt.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) {} try { - SHA256.hash(data.getInputStream(), md); + InputStream is = data.getInputStream(); + SHA256.hash(is, md); + is.close(); } catch (IOException e) { SHA256.returnMessageDigest(md); Logger.error(this, "Got IOE: " +e.getMessage(), e); Modified: trunk/plugins/XMLLibrarian/XMLLibrarian.java =================================================================== --- trunk/plugins/XMLLibrarian/XMLLibrarian.java 2007-09-04 16:33:43 UTC (rev 14962) +++ trunk/plugins/XMLLibrarian/XMLLibrarian.java 2007-09-04 17:08:37 UTC (rev 14963) @@ -4,6 +4,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; +import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; @@ -690,7 +691,8 @@ SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(res.asBucket().getInputStream(), new LibrarianHandler() ); + InputStream is = res.asBucket().getInputStream(); + saxParser.parse(is, new LibrarianHandler() ); } catch (Throwable err) { err.printStackTrace ();} @@ -728,7 +730,9 @@ SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(res.asBucket().getInputStream(), new LibrarianHandler() ); + InputStream is = res.asBucket().getInputStream(); + saxParser.parse(is, new LibrarianHandler() ); + is.close(); } catch (Throwable err) { err.printStackTrace ();} } Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-04 16:33:43 UTC (rev 14962) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-04 17:08:37 UTC (rev 14963) @@ -125,7 +125,7 @@ /* * minTimeBetweenEachIndexRewriting in seconds */ - private static final int minTimeBetweenEachIndexRewriting = 1000; + private static final int minTimeBetweenEachIndexRewriting = 60; /** * directory where the generated indices are stored. * Needs to be created before it can be used @@ -417,7 +417,7 @@ } if(Logger.shouldLog(Logger.MINOR, this)) - Logger.minor(this, "Spider: indexes regenerated."); + Logger.minor(this, "Spider: indexes regenerated - tProducedIndex="+(System.currentTimeMillis()-tProducedIndex)+"ms ago time taken="+time_taken+"ms"); //The main xml file is generated //As each word is generated enter it into the respective subindex From toad at freenetproject.org Tue Sep 4 17:31:43 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Tue, 4 Sep 2007 17:31:43 +0000 (UTC) Subject: [freenet-cvs] r14964 - in trunk/freenet/src/freenet: clients/http node/fcp Message-ID: <20070904173143.8DA0D47AF23@freenetproject.org> Author: toad Date: 2007-09-04 17:31:43 +0000 (Tue, 04 Sep 2007) New Revision: 14964 Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java trunk/freenet/src/freenet/node/fcp/ClientRequest.java Log: Queue page: Asynchronous restart with feedback Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java =================================================================== --- trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2007-09-04 17:08:37 UTC (rev 14963) +++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2007-09-04 17:31:43 UTC (rev 14964) @@ -117,14 +117,7 @@ for (int requestIndex = 0, requestCount = clientRequests.length; requestIndex < requestCount; requestIndex++) { ClientRequest clientRequest = clientRequests[requestIndex]; if (clientRequest.getIdentifier().equals(identifier)) { - if(!clientRequest.restart()) { - sendErrorPage(ctx, 200, - L10n.getString("QueueToadlet.failedToRestartRequest"), - L10n.getString("QueueToadlet.failedToRestart", - new String[]{ "id" }, - new String[] { identifier} - )); - } + clientRequest.restartAsync(); } } fcp.forceStorePersistentRequests(); Modified: trunk/freenet/src/freenet/node/fcp/ClientRequest.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/ClientRequest.java 2007-09-04 17:08:37 UTC (rev 14963) +++ trunk/freenet/src/freenet/node/fcp/ClientRequest.java 2007-09-04 17:31:43 UTC (rev 14964) @@ -367,4 +367,15 @@ SerializableToFieldSetBucket bucket = (SerializableToFieldSetBucket) data; fs.put(name, bucket.toFieldSet()); } + + public void restartAsync() { + synchronized(this) { + this.started = false; + } + client.core.getExecutor().execute(new Runnable() { + public void run() { + restart(); + } + }, "Restarting "+this); + } } From nextgens at freenetproject.org Tue Sep 4 21:53:04 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 21:53:04 +0000 (UTC) Subject: [freenet-cvs] r14965 - trunk/freenet/src/freenet/support/io Message-ID: <20070904215304.6B580390923@freenetproject.org> Author: nextgens Date: 2007-09-04 21:53:04 +0000 (Tue, 04 Sep 2007) New Revision: 14965 Modified: trunk/freenet/src/freenet/support/io/FileUtil.java Log: Doh! r14948 was a merge error; revert it. Modified: trunk/freenet/src/freenet/support/io/FileUtil.java =================================================================== --- trunk/freenet/src/freenet/support/io/FileUtil.java 2007-09-04 17:31:43 UTC (rev 14964) +++ trunk/freenet/src/freenet/support/io/FileUtil.java 2007-09-04 21:53:04 UTC (rev 14965) @@ -12,6 +12,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import freenet.client.DefaultMIMETypes; @@ -24,7 +25,7 @@ } /** - * Guess estimate real disk usage for a file with a given filename, of a given length. + * Guesstimate real disk usage for a file with a given filename, of a given length. */ public static long estimateUsage(File file, long flen) { /** @@ -75,24 +76,33 @@ return result; } + // FIXME: this is called readUTF but it reads in the default charset ... eh?? public static String readUTF(File file) throws FileNotFoundException, IOException { + StringBuffer result = new StringBuffer(); FileInputStream fis = null; BufferedInputStream bis = null; - DataInputStream dis = null; + InputStreamReader isr = null; try { fis = new FileInputStream(file); bis = new BufferedInputStream(fis); - dis = new DataInputStream(bis); + isr = new InputStreamReader(bis); - return dis.readUTF(); + char[] buf = new char[4096]; + int length = 0; + + while((length = isr.read(buf)) > 0) { + result.append(buf, 0, length); + } + } finally { try { - if(dis != null) dis.close(); + if(isr != null) isr.close(); if(bis != null) bis.close(); if(fis != null) fis.close(); } catch (IOException e) {} } + return result.toString(); } public static boolean writeTo(InputStream input, File target) throws FileNotFoundException, IOException { From nextgens at freenetproject.org Tue Sep 4 21:54:43 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 21:54:43 +0000 (UTC) Subject: [freenet-cvs] r14966 - trunk/freenet/src/freenet/support/io Message-ID: <20070904215443.5C6C347AAA8@freenetproject.org> Author: nextgens Date: 2007-09-04 21:54:43 +0000 (Tue, 04 Sep 2007) New Revision: 14966 Modified: trunk/freenet/src/freenet/support/io/FileUtil.java Log: Fix it for real now ;) I know, instead of blaming svk I should blame my own stupidity. Modified: trunk/freenet/src/freenet/support/io/FileUtil.java =================================================================== --- trunk/freenet/src/freenet/support/io/FileUtil.java 2007-09-04 21:53:04 UTC (rev 14965) +++ trunk/freenet/src/freenet/support/io/FileUtil.java 2007-09-04 21:54:43 UTC (rev 14966) @@ -76,7 +76,6 @@ return result; } - // FIXME: this is called readUTF but it reads in the default charset ... eh?? public static String readUTF(File file) throws FileNotFoundException, IOException { StringBuffer result = new StringBuffer(); FileInputStream fis = null; @@ -86,7 +85,7 @@ try { fis = new FileInputStream(file); bis = new BufferedInputStream(fis); - isr = new InputStreamReader(bis); + isr = new InputStreamReader(bis, "UTF-8"); char[] buf = new char[4096]; int length = 0; From nextgens at freenetproject.org Tue Sep 4 22:01:42 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 22:01:42 +0000 (UTC) Subject: [freenet-cvs] r14967 - trunk/freenet/src/freenet/node Message-ID: <20070904220142.9C7B1390925@freenetproject.org> Author: nextgens Date: 2007-09-04 22:01:42 +0000 (Tue, 04 Sep 2007) New Revision: 14967 Modified: trunk/freenet/src/freenet/node/Node.java Log: Revert r14960. We do have a Node.nodeName Modified: trunk/freenet/src/freenet/node/Node.java =================================================================== --- trunk/freenet/src/freenet/node/Node.java 2007-09-04 21:54:43 UTC (rev 14966) +++ trunk/freenet/src/freenet/node/Node.java 2007-09-04 22:01:42 UTC (rev 14967) @@ -839,7 +839,7 @@ } // Name - nodeConfig.register("name", myName, sortOrder++, false, true, "MeaningfulNodeNameUserAlert.noNodeNickTitle", "MeaningfulNodeNameUserAlert.noNodeNick", + nodeConfig.register("name", myName, sortOrder++, false, true, "Node.nodeName", "Node.nodeNameLong", new NodeNameCallback(this)); myName = nodeConfig.getString("name"); From nextgens at freenetproject.org Tue Sep 4 22:29:29 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Tue, 4 Sep 2007 22:29:29 +0000 (UTC) Subject: [freenet-cvs] r14968 - trunk/freenet/src/freenet/node/useralerts Message-ID: <20070904222929.1BB2847A3B6@freenetproject.org> Author: nextgens Date: 2007-09-04 22:29:28 +0000 (Tue, 04 Sep 2007) New Revision: 14968 Modified: trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java Log: Fix an issue with MeaningfulNodeNameUserAlert : we weren't displaying the l10n strings but their keys! Modified: trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java =================================================================== --- trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java 2007-09-04 22:01:42 UTC (rev 14967) +++ trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java 2007-09-04 22:29:28 UTC (rev 14968) @@ -44,8 +44,11 @@ formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword }); HTMLNode listNode = formNode.addChild("ul", "class", "config"); HTMLNode itemNode = listNode.addChild("li"); - itemNode.addChild("span", "class", "configshortdesc", o.getShortDesc()).addChild("input", new String[] { "type", "name", "value" }, new String[] { "text", sc.getPrefix() + ".name", o.getValueString() }); - itemNode.addChild("span", "class", "configlongdesc", o.getLongDesc()); + itemNode.addChild("span", new String[]{ "class", "title", "style" }, + new String[]{ "configshortdesc", L10n.getString("ConfigToadlet.defaultIs", new String[] { "default" }, new String[] { o.getDefault() }), + "cursor: help;" }).addChild(L10n.getHTMLNode(o.getShortDesc())); + itemNode.addChild("input", new String[] { "type", "class", "alt", "name", "value" }, new String[] { "text", "config", o.getShortDesc(), "node.name", o.getValueString() }); + itemNode.addChild("span", "class", "configlongdesc").addChild(L10n.getHTMLNode(o.getLongDesc())); formNode.addChild("input", new String[] { "type", "value" }, new String[] { "submit", L10n.getString("UserAlert.apply") }); formNode.addChild("input", new String[] { "type", "value" }, new String[] { "reset", L10n.getString("UserAlert.reset") }); From toad at freenetproject.org Wed Sep 5 16:18:22 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Wed, 5 Sep 2007 16:18:22 +0000 (UTC) Subject: [freenet-cvs] r14973 - trunk/freenet/src/freenet/support/transport/ip Message-ID: <20070905161822.C58C647B2B8@freenetproject.org> Author: toad Date: 2007-09-05 16:18:22 +0000 (Wed, 05 Sep 2007) New Revision: 14973 Modified: trunk/freenet/src/freenet/support/transport/ip/IPAddressDetector.java Log: we don't support pre-1.4 and i doubt this code would work anyway Modified: trunk/freenet/src/freenet/support/transport/ip/IPAddressDetector.java =================================================================== --- trunk/freenet/src/freenet/support/transport/ip/IPAddressDetector.java 2007-09-05 14:54:37 UTC (rev 14972) +++ trunk/freenet/src/freenet/support/transport/ip/IPAddressDetector.java 2007-09-05 16:18:22 UTC (rev 14973) @@ -75,9 +75,6 @@ Enumeration interfaces = null; try { interfaces = java.net.NetworkInterface.getNetworkInterfaces(); - } catch (NoClassDefFoundError e) { - addrs.add(oldDetect()); - old = true; } catch (SocketException e) { Logger.error( this, From toad at freenetproject.org Wed Sep 5 16:31:03 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Wed, 5 Sep 2007 16:31:03 +0000 (UTC) Subject: [freenet-cvs] r14974 - trunk/plugins/XMLSpider Message-ID: <20070905163103.54A3747B2C5@freenetproject.org> Author: toad Date: 2007-09-05 16:31:03 +0000 (Wed, 05 Sep 2007) New Revision: 14974 Modified: trunk/plugins/XMLSpider/XMLSpider.java Log: logging Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 16:18:22 UTC (rev 14973) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 16:31:03 UTC (rev 14974) @@ -340,7 +340,7 @@ xmlBuilder = xmlFactory.newDocumentBuilder(); } catch(javax.xml.parsers.ParserConfigurationException e) { - Logger.error(this, "Spider: Error while initializing XML generator: "+e.toString()); + Logger.error(this, "Spider: Error while initializing XML generator: "+e.toString(), e); return; } @@ -401,7 +401,7 @@ try { serializer = transformFactory.newTransformer(); } catch(javax.xml.transform.TransformerConfigurationException e) { - Logger.error(this, "Spider: Error while serializing XML (transformFactory.newTransformer()): "+e.toString()); + Logger.error(this, "Spider: Error while serializing XML (transformFactory.newTransformer()): "+e.toString(), e); return; } @@ -412,7 +412,7 @@ try { serializer.transform(domSource, resultStream); } catch(javax.xml.transform.TransformerException e) { - Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString()); + Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString(), e); return; } @@ -532,7 +532,7 @@ try { xmlBuilder = xmlFactory.newDocumentBuilder(); } catch(javax.xml.parsers.ParserConfigurationException e) { - Logger.error(this, "Spider: Error while initializing XML generator: "+e.toString()); + Logger.error(this, "Spider: Error while initializing XML generator: "+e.toString(), e); return; } @@ -619,7 +619,7 @@ try { serializer = transformFactory.newTransformer(); } catch(javax.xml.transform.TransformerConfigurationException e) { - Logger.error(this, "Spider: Error while serializing XML (transformFactory.newTransformer()): "+e.toString()); + Logger.error(this, "Spider: Error while serializing XML (transformFactory.newTransformer()): "+e.toString(), e); return; } serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); @@ -628,7 +628,7 @@ try { serializer.transform(domSource, resultStream); } catch(javax.xml.transform.TransformerException e) { - Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString()); + Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString(), e); return; } @@ -752,7 +752,7 @@ xmlBuilder = xmlFactory.newDocumentBuilder(); } catch(javax.xml.parsers.ParserConfigurationException e) { /* Will (should ?) never happen */ - Logger.error(this, "Spider: Error while initializing XML generator: "+e.toString()); + Logger.error(this, "Spider: Error while initializing XML generator: "+e.toString(), e); return; } @@ -814,7 +814,7 @@ try { serializer = transformFactory.newTransformer(); } catch(javax.xml.transform.TransformerConfigurationException e) { - Logger.error(this, "Spider: Error while serializing XML (transformFactory.newTransformer()): "+e.toString()); + Logger.error(this, "Spider: Error while serializing XML (transformFactory.newTransformer()): "+e.toString(), e); return; } @@ -826,7 +826,7 @@ try { serializer.transform(domSource, resultStream); } catch(javax.xml.transform.TransformerException e) { - Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString()); + Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString(), e); return; } From toad at freenetproject.org Wed Sep 5 16:32:29 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Wed, 5 Sep 2007 16:32:29 +0000 (UTC) Subject: [freenet-cvs] r14975 - trunk/plugins/XMLLibrarian Message-ID: <20070905163229.680D447B2C5@freenetproject.org> Author: toad Date: 2007-09-05 16:32:29 +0000 (Wed, 05 Sep 2007) New Revision: 14975 Modified: trunk/plugins/XMLLibrarian/XMLLibrarian.java Log: Missed one Modified: trunk/plugins/XMLLibrarian/XMLLibrarian.java =================================================================== --- trunk/plugins/XMLLibrarian/XMLLibrarian.java 2007-09-05 16:31:03 UTC (rev 14974) +++ trunk/plugins/XMLLibrarian/XMLLibrarian.java 2007-09-05 16:32:29 UTC (rev 14975) @@ -693,6 +693,7 @@ SAXParser saxParser = factory.newSAXParser(); InputStream is = res.asBucket().getInputStream(); saxParser.parse(is, new LibrarianHandler() ); + is.close(); } catch (Throwable err) { err.printStackTrace ();} From toad at freenetproject.org Wed Sep 5 16:55:56 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Wed, 5 Sep 2007 16:55:56 +0000 (UTC) Subject: [freenet-cvs] r14976 - trunk/plugins/XMLSpider Message-ID: <20070905165556.C360B47B2E5@freenetproject.org> Author: toad Date: 2007-09-05 16:55:56 +0000 (Wed, 05 Sep 2007) New Revision: 14976 Modified: trunk/plugins/XMLSpider/XMLSpider.java Log: Save some file descriptors by feeding FileOutputStream's to StreamResult and closing them manually. (They seem to be closed lazily if we pass in a File). Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 16:32:29 UTC (rev 14975) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 16:55:56 UTC (rev 14976) @@ -3,7 +3,10 @@ * http://www.gnu.org/ for further details of the GPL. */ package plugins.XMLSpider; +import java.io.BufferedOutputStream; import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -323,9 +326,12 @@ } //the main index file File outputFile = new File(DEFAULT_INDEX_DIR+"index.xml"); + // Use a stream so we can explicitly close - minimise number of filehandles used. + BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(outputFile)); StreamResult resultStream; - resultStream = new StreamResult(outputFile); + resultStream = new StreamResult(fos); + try { /* Initialize xml builder */ Document xmlDoc = null; DocumentBuilderFactory xmlFactory = null; @@ -415,6 +421,9 @@ Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString(), e); return; } + } finally { + fos.close(); + } if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Spider: indexes regenerated - tProducedIndex="+(System.currentTimeMillis()-tProducedIndex)+"ms ago time taken="+time_taken+"ms"); @@ -518,9 +527,11 @@ String p = ((String) list.elementAt(0)).substring(0, prefix); indices.add(p); File outputFile = new File(DEFAULT_INDEX_DIR+"index_"+p+".xml"); + BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(outputFile)); StreamResult resultStream; - resultStream = new StreamResult(outputFile); + resultStream = new StreamResult(fos); + try { /* Initialize xml builder */ Document xmlDoc = null; DocumentBuilderFactory xmlFactory = null; @@ -631,6 +642,9 @@ Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString(), e); return; } + } finally { + fos.close(); + } if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Spider: indexes regenerated."); @@ -735,8 +749,16 @@ public void generateSubIndex(String filename){ // generates the new subIndex File outputFile = new File(filename); + BufferedOutputStream fos; + try { + fos = new BufferedOutputStream(new FileOutputStream(outputFile)); + } catch (FileNotFoundException e1) { + Logger.error(this, "Cannot open "+filename+" writing index : "+e1, e1); + return; + } + try { StreamResult resultStream; - resultStream = new StreamResult(outputFile); + resultStream = new StreamResult(fos); /* Initialize xml builder */ Document xmlDoc = null; @@ -829,6 +851,13 @@ Logger.error(this, "Spider: Error while serializing XML (transform()): "+e.toString(), e); return; } + } finally { + try { + fos.close(); + } catch (IOException e) { + // Ignore + } + } if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Spider: indexes regenerated."); From toad at freenetproject.org Wed Sep 5 17:05:05 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Wed, 5 Sep 2007 17:05:05 +0000 (UTC) Subject: [freenet-cvs] r14977 - trunk/plugins/XMLSpider Message-ID: <20070905170505.9E51947B2CA@freenetproject.org> Author: toad Date: 2007-09-05 17:05:05 +0000 (Wed, 05 Sep 2007) New Revision: 14977 Modified: trunk/plugins/XMLSpider/XMLSpider.java Log: Only write indexes every 10 minutes. Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 16:55:56 UTC (rev 14976) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 17:05:05 UTC (rev 14977) @@ -128,7 +128,7 @@ /* * minTimeBetweenEachIndexRewriting in seconds */ - private static final int minTimeBetweenEachIndexRewriting = 60; + private static final int minTimeBetweenEachIndexRewriting = 600; /** * directory where the generated indices are stored. * Needs to be created before it can be used From nextgens at freenetproject.org Wed Sep 5 20:27:57 2007 From: nextgens at freenetproject.org (nextgens at freenetproject.org) Date: Wed, 5 Sep 2007 20:27:57 +0000 (UTC) Subject: [freenet-cvs] r14978 - trunk/freenet/src/freenet/node/fcp Message-ID: <20070905202757.330D647A37A@freenetproject.org> Author: nextgens Date: 2007-09-05 20:27:56 +0000 (Wed, 05 Sep 2007) New Revision: 14978 Modified: trunk/freenet/src/freenet/node/fcp/AllDataMessage.java Log: Spare some memory in AllDataMessages (improvement suggested by toad) Modified: trunk/freenet/src/freenet/node/fcp/AllDataMessage.java =================================================================== --- trunk/freenet/src/freenet/node/fcp/AllDataMessage.java 2007-09-05 17:05:05 UTC (rev 14977) +++ trunk/freenet/src/freenet/node/fcp/AllDataMessage.java 2007-09-05 20:27:56 UTC (rev 14978) @@ -17,15 +17,15 @@ final long dataLength; final boolean global; final String identifier; - final String startupTime, completionTime; + final long startupTime, completionTime; public AllDataMessage(Bucket bucket, String identifier, boolean global, long startupTime, long completionTime) { this.bucket = bucket; this.dataLength = bucket.size(); this.identifier = identifier; this.global = global; - this.startupTime = String.valueOf(startupTime); - this.completionTime = String.valueOf(completionTime); + this.startupTime = startupTime; + this.completionTime = completionTime; } long dataLength() { @@ -34,11 +34,11 @@ public SimpleFieldSet getFieldSet() { SimpleFieldSet fs = new SimpleFieldSet(true); - fs.putSingle("DataLength", Long.toString(dataLength)); + fs.put("DataLength", dataLength); fs.putSingle("Identifier", identifier); if(global) fs.putSingle("Global", "true"); - fs.putSingle("StartuptTime", startupTime); - fs.putSingle("CompletionTime", completionTime); + fs.put("StartuptTime", startupTime); + fs.put("CompletionTime", completionTime); return fs; } From toad at freenetproject.org Wed Sep 5 23:28:08 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Wed, 5 Sep 2007 23:28:08 +0000 (UTC) Subject: [freenet-cvs] r14979 - in trunk: freenet/src/freenet/clients/http freenet/src/freenet/clients/http/filter freenet/src/freenet/support/io plugins/XMLSpider Message-ID: <20070905232808.196A747AE99@freenetproject.org> Author: toad Date: 2007-09-05 23:28:07 +0000 (Wed, 05 Sep 2007) New Revision: 14979 Added: trunk/freenet/src/freenet/support/io/NullBucketFactory.java Modified: trunk/freenet/src/freenet/clients/http/NinjaSpider.java trunk/freenet/src/freenet/clients/http/Spider.java trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java trunk/plugins/XMLSpider/XMLSpider.java Log: Don't leak a temp bucket for output of filtering in spiders Modified: trunk/freenet/src/freenet/clients/http/NinjaSpider.java =================================================================== --- trunk/freenet/src/freenet/clients/http/NinjaSpider.java 2007-09-05 20:27:56 UTC (rev 14978) +++ trunk/freenet/src/freenet/clients/http/NinjaSpider.java 2007-09-05 23:28:07 UTC (rev 14979) @@ -53,6 +53,7 @@ import freenet.support.MultiValueTable; import freenet.support.api.Bucket; import freenet.support.api.HTTPRequest; +import freenet.support.io.NullBucketFactory; /** * FIXME move to a proper plugin. @@ -192,7 +193,7 @@ mimeOfURIs.put(uri.toString(), mimeType); try { - ContentFilter.filter(data, ctx.bucketFactory, mimeType, new URI("http://127.0.0.1:8888/" + uri.toString()), this); + ContentFilter.filter(data, new NullBucketFactory(), mimeType, new URI("http://127.0.0.1:8888/" + uri.toString()), this); } catch (UnsafeContentTypeException e) { return; // Ignore } catch (IOException e) { Modified: trunk/freenet/src/freenet/clients/http/Spider.java =================================================================== --- trunk/freenet/src/freenet/clients/http/Spider.java 2007-09-05 20:27:56 UTC (rev 14978) +++ trunk/freenet/src/freenet/clients/http/Spider.java 2007-09-05 23:28:07 UTC (rev 14979) @@ -43,6 +43,7 @@ import freenet.support.MultiValueTable; import freenet.support.api.Bucket; import freenet.support.api.HTTPRequest; +import freenet.support.io.NullBucketFactory; /** * Spider. Produces an index. @@ -136,7 +137,7 @@ Bucket data = result.asBucket(); String mimeType = cm.getMIMEType(); try { - ContentFilter.filter(data, ctx.bucketFactory, mimeType, uri.toURI("http://127.0.0.1:8888/"), this); + ContentFilter.filter(data, new NullBucketFactory(), mimeType, uri.toURI("http://127.0.0.1:8888/"), this); } catch (UnsafeContentTypeException e) { return; // Ignore } catch (IOException e) { Modified: trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java =================================================================== --- trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java 2007-09-05 20:27:56 UTC (rev 14978) +++ trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java 2007-09-05 23:28:07 UTC (rev 14979) @@ -119,6 +119,7 @@ /** * Filter some data. + * @param bf The bucket factory used to create the bucket to return the filtered data in. * @throws IOException If an internal error involving buckets occurred. */ public static FilterOutput filter(Bucket data, BucketFactory bf, String typeName, URI baseURI, FoundURICallback cb) throws UnsafeContentTypeException, IOException { Added: trunk/freenet/src/freenet/support/io/NullBucketFactory.java =================================================================== --- trunk/freenet/src/freenet/support/io/NullBucketFactory.java (rev 0) +++ trunk/freenet/src/freenet/support/io/NullBucketFactory.java 2007-09-05 23:28:07 UTC (rev 14979) @@ -0,0 +1,14 @@ +package freenet.support.io; + +import java.io.IOException; + +import freenet.support.api.Bucket; +import freenet.support.api.BucketFactory; + +public class NullBucketFactory implements BucketFactory { + + public Bucket makeBucket(long size) throws IOException { + return new NullBucket(); + } + +} Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 20:27:56 UTC (rev 14978) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-05 23:28:07 UTC (rev 14979) @@ -67,6 +67,7 @@ import freenet.support.Logger; import freenet.support.api.Bucket; import freenet.support.api.HTTPRequest; +import freenet.support.io.NullBucketFactory; /** * XMLSpider. Produces xml index for searching words. @@ -270,7 +271,7 @@ try { Logger.minor(this, "Filtering "+uri+" : "+page.id); - ContentFilter.filter(data, ctx.bucketFactory, mimeType, uri.toURI("http://127.0.0.1:8888/"), page); + ContentFilter.filter(data, new NullBucketFactory(), mimeType, uri.toURI("http://127.0.0.1:8888/"), page); } catch (UnsafeContentTypeException e) { return; // Ignore } catch (IOException e) { From toad at freenetproject.org Thu Sep 6 16:38:01 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 16:38:01 +0000 (UTC) Subject: [freenet-cvs] r14987 - trunk/plugins/XMLSpider Message-ID: <20070906163801.7E11C47AEB8@freenetproject.org> Author: toad Date: 2007-09-06 16:38:01 +0000 (Thu, 06 Sep 2007) New Revision: 14987 Modified: trunk/plugins/XMLSpider/XMLSpider.java Log: imports Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-06 15:03:55 UTC (rev 14986) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-06 16:38:01 UTC (rev 14987) @@ -7,7 +7,6 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; -import java.io.FileWriter; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; From toad at freenetproject.org Thu Sep 6 16:40:37 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 16:40:37 +0000 (UTC) Subject: [freenet-cvs] r14988 - trunk/plugins/XMLSpider Message-ID: <20070906164037.2C0D247817B@freenetproject.org> Author: toad Date: 2007-09-06 16:40:36 +0000 (Thu, 06 Sep 2007) New Revision: 14988 Modified: trunk/plugins/XMLSpider/XMLSpider.java Log: Make sub-indexes much bigger. We can't rely on grouping them together in containers, because: - mostly words which are near to each other in the index are not closely related - we'd need multiple container support and we don't have it - the containers would be big chunks to fetch and often wouldn't be reused on a big index So it makes sense to just use huge sub-indexes. Long term we want sub-indexes to be split by size rather than number of entries. Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-06 16:38:01 UTC (rev 14987) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-06 16:40:36 UTC (rev 14988) @@ -138,7 +138,7 @@ * Lists the allowed mime types of the fetched page. */ public Set allowedMIMETypes; - private static final int MAX_ENTRIES = 20; + private static final int MAX_ENTRIES = 200; private static int version = 7; private static final String pluginName = "XML spider "+version; /** From toad at freenetproject.org Thu Sep 6 17:15:37 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 17:15:37 +0000 (UTC) Subject: [freenet-cvs] r14989 - trunk/plugins/XMLSpider Message-ID: <20070906171537.5B9B847982F@freenetproject.org> Author: toad Date: 2007-09-06 17:15:37 +0000 (Thu, 06 Sep 2007) New Revision: 14989 Modified: trunk/plugins/XMLSpider/XMLSpider.java Log: up spider version to 8 for minor changes including much bigger subindexes Modified: trunk/plugins/XMLSpider/XMLSpider.java =================================================================== --- trunk/plugins/XMLSpider/XMLSpider.java 2007-09-06 16:40:36 UTC (rev 14988) +++ trunk/plugins/XMLSpider/XMLSpider.java 2007-09-06 17:15:37 UTC (rev 14989) @@ -139,7 +139,7 @@ */ public Set allowedMIMETypes; private static final int MAX_ENTRIES = 200; - private static int version = 7; + private static int version = 8; private static final String pluginName = "XML spider "+version; /** * Gives the allowed fraction of total time spent on generating indices with From toad at freenetproject.org Thu Sep 6 18:32:00 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 18:32:00 +0000 (UTC) Subject: [freenet-cvs] r14990 - trunk/freenet/src/freenet/node Message-ID: <20070906183200.6BF84479FA1@freenetproject.org> Author: toad Date: 2007-09-06 18:32:00 +0000 (Thu, 06 Sep 2007) New Revision: 14990 Modified: trunk/freenet/src/freenet/node/RequestSender.java Log: Fix an NPE if opennet is disabled Modified: trunk/freenet/src/freenet/node/RequestSender.java =================================================================== --- trunk/freenet/src/freenet/node/RequestSender.java 2007-09-06 17:15:37 UTC (rev 14989) +++ trunk/freenet/src/freenet/node/RequestSender.java 2007-09-06 18:32:00 UTC (rev 14990) @@ -692,7 +692,8 @@ OpennetManager om = node.getOpennet(); try { - if(om != null /* prevent race */ && !node.addNewOpennetNode(ref)) { + if(om == null || + (om != null /* prevent race */ && !node.addNewOpennetNode(ref))) { // If we don't want it let somebody else have it synchronized(this) { opennetNoderef = noderef; From toad at freenetproject.org Thu Sep 6 18:34:31 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 18:34:31 +0000 (UTC) Subject: [freenet-cvs] r14991 - trunk/freenet/src/freenet/node Message-ID: <20070906183431.3478147AA2B@freenetproject.org> Author: toad Date: 2007-09-06 18:34:31 +0000 (Thu, 06 Sep 2007) New Revision: 14991 Modified: trunk/freenet/src/freenet/node/RequestSender.java Log: Don't wait forever for an opennet ref Modified: trunk/freenet/src/freenet/node/RequestSender.java =================================================================== --- trunk/freenet/src/freenet/node/RequestSender.java 2007-09-06 18:32:00 UTC (rev 14990) +++ trunk/freenet/src/freenet/node/RequestSender.java 2007-09-06 18:34:31 UTC (rev 14991) @@ -753,7 +753,9 @@ wait(OPENNET_TIMEOUT); } catch (InterruptedException e) { // Ignore + continue; } + return null; } } } From toad at freenetproject.org Thu Sep 6 22:55:48 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 22:55:48 +0000 (UTC) Subject: [freenet-cvs] r14992 - trunk/freenet/src/freenet/clients/http/bookmark Message-ID: <20070906225548.273D947B298@freenetproject.org> Author: toad Date: 2007-09-06 22:55:47 +0000 (Thu, 06 Sep 2007) New Revision: 14992 Modified: trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java Log: Add TSOF, for now. Hopefully it will encourage him to update it and grow it. Modified: trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java =================================================================== --- trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java 2007-09-06 18:34:31 UTC (rev 14991) +++ trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java 2007-09-06 22:55:47 UTC (rev 14992) @@ -47,9 +47,15 @@ indexes.addBookmark(new BookmarkItem( new FreenetURI( "USK at RJnh1EnvOSPwOWVRS2nyhC4eIQkKoNE5hcTv7~yY-sM,pOloLxnKWM~AL24iDMHOAvTvCqMlB-p2BO9zK96TOZA,AQACAAE/index_fr/8/"), - "Index des sites Fran?ais (french freesites with descriptions but no categories)", + "Index des sites Fran???ais (french freesites with descriptions but no categories)", node.alerts)); + indexes.addBookmark(new BookmarkItem( + new FreenetURI( + "USK at cvZEZFWynx~4hmakaimts4Ruusl9mEUpU6mSvNvZ9p8,K2Xopc6GWPkKrs27EDuqzTcca2bE5H2YAXw0qKnkON4,AQACAAE/TSOF/1/"), + "The Start Of Freenet (another human-maintained index, so far relatively small)", + node.alerts)); + BookmarkCategory flog = (BookmarkCategory) defaultRoot.addBookmark(new BookmarkCategory("Freenet devel's flogs")); flog.addBookmark(new BookmarkItem( new FreenetURI( From toad at freenetproject.org Thu Sep 6 23:22:45 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Thu, 6 Sep 2007 23:22:45 +0000 (UTC) Subject: [freenet-cvs] r14993 - trunk/freenet/src/freenet/node Message-ID: <20070906232245.635B547993C@freenetproject.org> Author: toad Date: 2007-09-06 23:22:45 +0000 (Thu, 06 Sep 2007) New Revision: 14993 Modified: trunk/freenet/src/freenet/node/Version.java Log: 1057: I18N etc - Spanish updates - French typo - Wording/capitalisation fixes re opennet - Read some files as UTF8 rather than as local charset (FileUtil fix) Web interface: - Update bookmarks - Add a french index - Add TSOF, a very new manual index - Mention that the node will strip IRC cruft on the paste box (need review of language/appropriateness) - Only show the private note box on Friends, not on Strangers (there was no label on the latter and it can't be used anyway) - Fetch logs on web interface: simpler implementation - First time wizard: Call the config getter again to clear the node name user alert - Queue page: restart jobs in the background after asking, indicate that they are starting - Node name alert: display the text, not the keys, in the config form. Client layer: - ClientRequestScheduler: Splitfiles/other multi-key stuff: Just because one key is broken-as-inserted doesn't mean they are all broken - Don't continue startup of a site insert once it has broken - Synchronization fixes on site insert start Opennet: - Fix an NPE at the end of RequestSender when opennet is disabled. Probably doesn't matter. - Don't wait forever for an opennet ref in RequestSender! FCP: - Add CompletionTime, StartupTime timestamps to requests Debugging etc: (kryptos SoC ending) - Slightly better CPUID (extended family description strings) - Version compatibility cast - Log thread PIDs on linux - Comments - Logging, thread names, toString() - Indenting - Tell eclipse that the whole project is UTF-8 - Remove probably non-working back compatibility code in IPAddressDetector Minor optimisations: - Fix file handle leaks in various places - Use explicit streams and explicitly close them in XMLSpider when writing (sub-)indexes JFK: (kryptos SoC ending) - response caching (important part of DoS resistance iirc) - authentication fixes - synchronization - comments - build fixes - documentation updates Unit testing: (sback SoC ending) - HTMLNode now 99%~=fully covered - Another LRUHashtable test Echo: (fred SoC ending) - Close to alpha release - Able to insert the site itself - i18n, CSS changes, other improvements - textile4j - textile support (simple human-writable web formatting) - create the base dir XMLSpider/XMLLibrarian: (swati SoC ending) - index in myindex7/ - 200 words max per subindex (we want fairly big sub-indexes) - some refactoring - increase priority to 3 - I think there is a problem with SSK fetches being constantly saturated by ARKs etc (workaround by toad so can test the spider) - write indexes every 10 minutes (swati set it to 1000 seconds i.e. ~ 20 mins, I changed it) - fix a bucket leak, write filtered data to a null bucket, in all spiders Installer: - Spanish translation Credits: - caco_patane - juiceman - kryptos - zothar - nextgens - toad Modified: trunk/freenet/src/freenet/node/Version.java =================================================================== --- trunk/freenet/src/freenet/node/Version.java 2007-09-06 22:55:47 UTC (rev 14992) +++ trunk/freenet/src/freenet/node/Version.java 2007-09-06 23:22:45 UTC (rev 14993) @@ -24,7 +24,7 @@ public static final String protocolVersion = "1.0"; /** The build number of the current revision */ - private static final int buildNumber = 1056; + private static final int buildNumber = 1057; /** Oldest build of Fred we will talk to */ private static final int oldLastGoodBuild = 1054; From toad at freenetproject.org Fri Sep 7 13:34:39 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Fri, 7 Sep 2007 13:34:39 +0000 (UTC) Subject: [freenet-cvs] r14994 - trunk/freenet/src/freenet/node/updater Message-ID: <20070907133439.CA1A747AE78@freenetproject.org> Author: toad Date: 2007-09-07 13:34:39 +0000 (Fri, 07 Sep 2007) New Revision: 14994 Modified: trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java Log: Use NodeStarter.extBuildNumber() not ExtVersion.buildNumber. This is likely to be more accurate and may fix the failure to update the ext.jar. Also logging. Modified: trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java =================================================================== --- trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java 2007-09-06 23:22:45 UTC (rev 14993) +++ trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java 2007-09-07 13:34:39 UTC (rev 14994) @@ -594,16 +594,20 @@ void onDownloadedNewJar(boolean isExt) { synchronized(this) { if(isExt) { - if(extUpdater.getFetchedVersion() > ExtVersion.buildNumber) { + if(extUpdater.getFetchedVersion() > NodeStarter.extBuildNumber) { hasNewExtJar = true; startedFetchingNextExtJar = -1; gotJarTime = System.currentTimeMillis(); + if(logMINOR) + Logger.minor(this, "Got ext jar: "+extUpdater.getFetchedVersion()); } } else { if(mainUpdater.getFetchedVersion() > Version.buildNumber()) { hasNewMainJar = true; startedFetchingNextMainJar = -1; gotJarTime = System.currentTimeMillis(); + if(logMINOR) + Logger.minor(this, "Got main jar: "+mainUpdater.getFetchedVersion()); } } } From toad at freenetproject.org Fri Sep 7 13:41:42 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Fri, 7 Sep 2007 13:41:42 +0000 (UTC) Subject: [freenet-cvs] r14995 - trunk/freenet/src/freenet/node/updater Message-ID: <20070907134142.5A3AA4796EF@freenetproject.org> Author: toad Date: 2007-09-07 13:41:42 +0000 (Fri, 07 Sep 2007) New Revision: 14995 Modified: trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java Log: imports Modified: trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java =================================================================== --- trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java 2007-09-07 13:34:39 UTC (rev 14994) +++ trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java 2007-09-07 13:41:42 UTC (rev 14995) @@ -14,7 +14,6 @@ import freenet.io.comm.NotConnectedException; import freenet.keys.FreenetURI; import freenet.l10n.L10n; -import freenet.node.ExtVersion; import freenet.node.Node; import freenet.node.NodeInitException; import freenet.node.NodeStarter; From toad at freenetproject.org Fri Sep 7 13:48:56 2007 From: toad at freenetproject.org (toad at freenetproject.org) Date: Fri, 7 Sep 2007 13:48:56 +0000 (UTC) Subject: [freen