Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv27784/src/freenet
Modified Files:
ConnectionHandler.java Version.java
Log Message:
6280:
WE WERE ROUTING TO THE NODE WITH THE WORST ESTIMATE. PROFUSE APOLOGIES, MAYBE IT WILL
WORK BETTER NOW!!!
Don't count nodes we aren't connected to for purposes of pLegitDNF
Logging, try to catch hirvox crash-bug.
Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -w -r1.198 -r1.199
--- ConnectionHandler.java 25 Oct 2003 00:45:35 -0000 1.198
+++ ConnectionHandler.java 25 Oct 2003 18:28:00 -0000 1.199
@@ -598,8 +598,9 @@
if(a == null) return -1; // closed already
synchronized(a) {
if(accumulator == null) return -1;
- if(a.limit() + initialLimit >
- a.capacity()) {
+ int accumulatorCurLimit = a.limit();
+ if(accumulatorCurLimit + initialLimit >
+ BUF_SIZE) {
if(reregistering) {
Core.logger.log(this,
"Buffer still full "+
"while reregistering!: "+
@@ -619,13 +620,24 @@
return 0;
}
+ if(logDEBUG)
+ logDEBUG("Reading into
_accumulator from "+accumulatorCurLimit+
+ " for
"+initialLimit+" bytes");
+ try {
decryptLen =
decrypted.read(_accumulator,
-
a.limit(),
+
accumulatorCurLimit,
initialLimit);
+ } catch (IndexOutOfBoundsException e) {
+ // FIXME: this is to catch
hirvox's bug
+ // Can probably be removed
later
+ Core.logger.log(this, "Caught
"+e+" in CH.process(), doing "+
+
"decrypted.read("+accumStatus()+","+
+
accumulatorCurLimit+","+initialLimit+"): "+e,
+
e, Logger.ERROR);
+ throw e;
+ }
if(decryptLen > 0) {
a.limit(a.limit() +
decryptLen);
- /* if
(movingTrailingFields) System.out.println("****TRAILING FIELD****");
- else
System.out.println(new String(_accumulator));*/
}
}
} catch (IOException e) { decryptLen = 0; }
Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.473
retrieving revision 1.474
diff -u -w -r1.473 -r1.474
--- Version.java 25 Oct 2003 01:11:05 -0000 1.473
+++ Version.java 25 Oct 2003 18:28:00 -0000 1.474
@@ -18,7 +18,7 @@
public static String protocolVersion = "1.47";
/** The build number of the current revision */
- public static final int buildNumber = 6279;
+ public static final int buildNumber = 6280;
// 6028: may 3; ARK retrieval fix
public static final int ignoreBuildsAfter = 6500;
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs