r26628 - in trunk/freenet/src/freenet: io/comm node

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-07 23:39:49 +0000 (Tue, 07 Apr 2009)
New Revision: 26628

Modified:
   trunk/freenet/src/freenet/io/comm/RetrievalException.java
   trunk/freenet/src/freenet/node/RequestSender.java
Log:
Fix another possible source of assertion failures


Modified: trunk/freenet/src/freenet/io/comm/RetrievalException.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/RetrievalException.java	2009-04-07 23:38:20 UTC (rev 26627)
+++ trunk/freenet/src/freenet/io/comm/RetrievalException.java	2009-04-07 23:39:49 UTC (rev 26628)
@@ -66,6 +66,11 @@
 	public String toString() {
 		return getErrString(_reason)+":"+_cause;
 	}
+
+	/** Guaranteed not to have any spaces in it. */
+	public String getErrString() {
+		return getErrString(_reason);
+	}
 	
 	public static String getErrString(int reason) {
 		switch (reason) {

Modified: trunk/freenet/src/freenet/node/RequestSender.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestSender.java	2009-04-07 23:38:20 UTC (rev 26627)
+++ trunk/freenet/src/freenet/node/RequestSender.java	2009-04-07 23:39:49 UTC (rev 26628)
@@ -876,7 +876,7 @@
                				if(timeout) {
                					// Looks like a timeout. Backoff, even if it's a turtle.
                					if(logMINOR) Logger.minor(this, "Timeout transferring data : "+e, e);
-               					next.transferFailed(e.toString());
+               					next.transferFailed(e.getErrString());
                				} else {
                					// Quick failure (in that we didn't have to timeout). Don't backoff.
                					// Treat as a DNF.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.