Author: toad
Date: 2009-02-26 18:34:35 +0000 (Thu, 26 Feb 2009)
New Revision: 25839
Modified:
trunk/freenet/
trunk/freenet/src/freenet/client/
trunk/freenet/src/freenet/client/FetchContext.java
trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
trunk/freenet/src/freenet/client/async/USKFetcher.java
Log:
Merge 25713 and 25714 from db4o branch: Make persistent u...@.../-<number>/
fetches work.
Property changes on: trunk/freenet
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/db4o:25594
/branches/db4o/freenet:24785,25282,25290,25332,25351-25352,25355-25356,25479,25488,25505,25540,25594,25673
+ /branches/db4o:25594
/branches/db4o/freenet:24785,25282,25290,25332,25351-25352,25355-25356,25479,25488,25505,25540,25594,25673,25713-25714
Property changes on: trunk/freenet/src/freenet/client
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/db4o/freenet/src/freenet/client:24785,25282,25290,25332,25351-25353,25355-25356,25479,25488,25505,25540,25594,25673
/branches/db4o/src/freenet/client:25594
+
/branches/db4o/freenet/src/freenet/client:24785,25282,25290,25332,25351-25353,25355-25356,25479,25488,25505,25540,25594,25673,25713-25714
/branches/db4o/src/freenet/client:25594
Modified: trunk/freenet/src/freenet/client/FetchContext.java
===================================================================
--- trunk/freenet/src/freenet/client/FetchContext.java 2009-02-26 18:30:15 UTC
(rev 25838)
+++ trunk/freenet/src/freenet/client/FetchContext.java 2009-02-26 18:34:35 UTC
(rev 25839)
@@ -36,6 +36,7 @@
public int maxSplitfileBlockRetries;
public int maxNonSplitfileRetries;
public final RandomSource random;
+ public int maxUSKRetries;
public boolean allowSplitfiles;
public boolean followRedirects;
public boolean localRequestOnly;
@@ -60,7 +61,7 @@
public FetchContext(long curMaxLength,
long curMaxTempLength, int maxMetadataSize, int
maxRecursionLevel, int maxArchiveRestarts, int maxArchiveLevels,
boolean dontEnterImplicitArchives, int
maxSplitfileThreads,
- int maxSplitfileBlockRetries, int
maxNonSplitfileRetries,
+ int maxSplitfileBlockRetries, int
maxNonSplitfileRetries, int maxUSKRetries,
boolean allowSplitfiles, boolean followRedirects,
boolean localRequestOnly,
int maxDataBlocksPerSegment, int
maxCheckBlocksPerSegment,
RandomSource random, ArchiveManager archiveManager,
BucketFactory bucketFactory,
@@ -84,6 +85,7 @@
this.maxSplitfileThreads = maxSplitfileThreads;
this.maxSplitfileBlockRetries = maxSplitfileBlockRetries;
this.maxNonSplitfileRetries = maxNonSplitfileRetries;
+ this.maxUSKRetries = maxUSKRetries;
this.allowSplitfiles = allowSplitfiles;
this.followRedirects = followRedirects;
this.localRequestOnly = localRequestOnly;
@@ -108,6 +110,7 @@
this.ignoreTooManyPathComponents =
ctx.ignoreTooManyPathComponents;
this.blocks = ctx.blocks;
this.allowedMIMETypes = ctx.allowedMIMETypes;
+ this.maxUSKRetries = ctx.maxUSKRetries;
if(maskID == IDENTICAL_MASK) {
this.maxOutputLength = ctx.maxOutputLength;
this.maxMetadataSize = ctx.maxMetadataSize;
Modified: trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
===================================================================
--- trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
2009-02-26 18:30:15 UTC (rev 25838)
+++ trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
2009-02-26 18:34:35 UTC (rev 25839)
@@ -64,6 +64,7 @@
static final int SPLITFILE_BLOCK_RETRIES = Math.min(3,
RequestScheduler.COOLDOWN_RETRIES-1);
/** Number of retries allowed on non-splitfile fetches. */
static final int NON_SPLITFILE_RETRIES = Math.min(3,
RequestScheduler.COOLDOWN_RETRIES-1);
+ static final int USK_RETRIES = RequestScheduler.COOLDOWN_RETRIES - 1;
/** Whether to fetch splitfiles. Don't turn this off! */
static final boolean FETCH_SPLITFILES = true;
/** Whether to follow redirects etc. If false, we only fetch a plain
block of data.
@@ -208,7 +209,7 @@
return
new FetchContext(maxLength, maxTempLength,
curMaxMetadataLength,
MAX_RECURSION, MAX_ARCHIVE_RESTARTS,
MAX_ARCHIVE_LEVELS, DONT_ENTER_IMPLICIT_ARCHIVES,
- SPLITFILE_THREADS, SPLITFILE_BLOCK_RETRIES,
NON_SPLITFILE_RETRIES,
+ SPLITFILE_THREADS, SPLITFILE_BLOCK_RETRIES,
NON_SPLITFILE_RETRIES, USK_RETRIES,
FETCH_SPLITFILES, FOLLOW_REDIRECTS,
LOCAL_REQUESTS_ONLY,
MAX_SPLITFILE_BLOCKS_PER_SEGMENT,
MAX_SPLITFILE_CHECK_BLOCKS_PER_SEGMENT,
random, archiveManager, bucketFactory,
globalEventProducer,
Modified: trunk/freenet/src/freenet/client/async/USKFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKFetcher.java 2009-02-26
18:30:15 UTC (rev 25838)
+++ trunk/freenet/src/freenet/client/async/USKFetcher.java 2009-02-26
18:34:35 UTC (rev 25839)
@@ -122,7 +122,7 @@
this.number = i;
this.succeeded = false;
this.dnf = false;
- this.checker = new USKChecker(this, origUSK.getSSK(i),
ctx.maxNonSplitfileRetries, ctx, parent);
+ this.checker = new USKChecker(this, origUSK.getSSK(i),
ctx.maxUSKRetries, ctx, parent);
}
public void onDNF() {
checker = null;
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs