Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv26203/src/freenet
Modified Files:
ConnectionHandler.java PeerHandler.java Version.java
Log Message:
minor simplifications in CH, keep opening conns if all ours are blocked with receiving
trailers, logging
Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -r1.178 -r1.179
--- ConnectionHandler.java 11 Oct 2003 01:02:10 -0000 1.178
+++ ConnectionHandler.java 11 Oct 2003 23:06:38 -0000 1.179
@@ -112,6 +112,7 @@
private final Object trailerSendLock = new Object();
private int sendingTrailerChunkBytes = 0;
private TrailerWriteCallback twcb;
+ ReceiveInputStream currentInputStream = null;
private PeerHandler peerHandler = null;
private boolean sendingCloseMessage = false;
@@ -660,8 +661,6 @@
boolean closeNow = false;
- DiscontinueInputStream currentInputStream = null;
-
private int innerProcess() {
int msgsThisTime = 0;
ByteBuffer x = accumulator; //accumulator might be set to null
otherplace, create another reference and test *that one* to avoid having to sync
@@ -2831,7 +2830,7 @@
[EMAIL PROTECTED] whether the connection is current receiving something
*/
public final boolean receiving() {
- return receivingCount > 0;
+ return currentInputStream != null;
}
public final Peer getPeer() {
Index: PeerHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/PeerHandler.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- PeerHandler.java 11 Oct 2003 20:00:13 -0000 1.14
+++ PeerHandler.java 11 Oct 2003 23:06:38 -0000 1.15
@@ -164,6 +164,10 @@
sendingCount++;
continue;
}
+ if(weak && ch.receiving()) {
+ sendingCount++;
+ continue;
+ }
// If it is sending a trailer, it is not available
// if(ch.isSendingPacket()) continue;
// But if it is sending only packets, it *IS* available
Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.427
retrieving revision 1.428
diff -u -r1.427 -r1.428
--- Version.java 11 Oct 2003 20:00:15 -0000 1.427
+++ Version.java 11 Oct 2003 23:06:38 -0000 1.428
@@ -18,7 +18,7 @@
public static String protocolVersion = "1.46";
/** The build number of the current revision */
- public static final int buildNumber = 6234;
+ public static final int buildNumber = 6235;
// 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