Author: toad
Date: 2006-05-25 15:47:02 +0000 (Thu, 25 May 2006)
New Revision: 8870
Modified:
trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
trunk/freenet/src/freenet/node/Version.java
trunk/freenet/src/freenet/node/fcp/ClientGet.java
trunk/freenet/src/freenet/node/fcp/FCPServer.java
Log:
740: Don't start persistent get's on startup if they are already finished.
Modified: trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
===================================================================
--- trunk/freenet/src/freenet/client/StandardOnionFECCodec.java 2006-05-25
15:27:32 UTC (rev 8869)
+++ trunk/freenet/src/freenet/client/StandardOnionFECCodec.java 2006-05-25
15:47:02 UTC (rev 8870)
@@ -137,6 +137,10 @@
private static int runningDecodes;
public void decode(SplitfileBlock[] dataBlockStatus, SplitfileBlock[]
checkBlockStatus, int blockLength, BucketFactory bf) throws IOException {
+ Logger.minor(this, "Queueing decode: " + dataBlockStatus.length
+ + " data blocks, " + checkBlockStatus.length
+ + " check blocks, block length " + blockLength
+ " with "
+ + this, new Exception("debug"));
// Ensure that there are only K simultaneous running decodes.
synchronized(runningDecodesSync) {
while(runningDecodes >= PARALLEL_DECODES) {
@@ -288,6 +292,10 @@
}
public void encode(Bucket[] dataBlockStatus, Bucket[] checkBlockStatus,
int blockLength, BucketFactory bf) throws IOException {
+ Logger.minor(this, "Queueing encode: " + dataBlockStatus.length
+ + " data blocks, " + checkBlockStatus.length
+ + " check blocks, block length " + blockLength
+ " with "
+ + this, new Exception("debug"));
// Encodes count as decodes.
synchronized(runningDecodesSync) {
while(runningDecodes >= PARALLEL_DECODES) {
Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2006-05-25 15:27:32 UTC (rev 8869)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2006-05-25 15:47:02 UTC (rev 8870)
@@ -85,6 +85,7 @@
blockFetchContext = new FetcherContext(fetcherContext,
FetcherContext.SPLITFILE_DEFAULT_BLOCK_MASK, true);
this.recursionLevel = 0;
}
+ Logger.minor(this, "Created "+this+" for "+parentFetcher);
}
public boolean isFinished() {
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-05-25 15:27:32 UTC (rev
8869)
+++ trunk/freenet/src/freenet/node/Version.java 2006-05-25 15:47:02 UTC (rev
8870)
@@ -18,7 +18,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 739;
+ private static final int buildNumber = 740;
/** Oldest build of Fred we will talk to */
private static final int lastGoodBuild = 732;
Modified: trunk/freenet/src/freenet/node/fcp/ClientGet.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientGet.java 2006-05-25 15:27:32 UTC
(rev 8869)
+++ trunk/freenet/src/freenet/node/fcp/ClientGet.java 2006-05-25 15:47:02 UTC
(rev 8870)
@@ -224,7 +224,8 @@
returnBucket = ret;
getter = new ClientGetter(this, client.node.chkFetchScheduler,
client.node.sskFetchScheduler, uri, fctx, priorityClass, client, returnBucket);
- start();
+ if(!finished)
+ start();
}
void start() {
Modified: trunk/freenet/src/freenet/node/fcp/FCPServer.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPServer.java 2006-05-25 15:27:32 UTC
(rev 8869)
+++ trunk/freenet/src/freenet/node/fcp/FCPServer.java 2006-05-25 15:47:02 UTC
(rev 8870)
@@ -12,13 +12,11 @@
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.BindException;
-import java.net.InetAddress;
import java.net.Socket;
import java.util.Iterator;
import java.util.Vector;
import java.util.WeakHashMap;
-import freenet.client.ClientMetadata;
import freenet.client.DefaultMIMETypes;
import freenet.client.FetcherContext;
import freenet.client.HighLevelSimpleClient;