Update of /cvsroot/freenet/freenet/src/freenet/transport
In directory sc8-pr-cvs1:/tmp/cvs-serv29322/src/freenet/transport
Modified Files:
WriteSelectorLoop.java
Log Message:
6223: major bugfixes, from local testing. also merge the Yarrow patch. also lots of
logging.
Index: WriteSelectorLoop.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/transport/WriteSelectorLoop.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- WriteSelectorLoop.java 10 Sep 2003 20:48:42 -0000 1.58
+++ WriteSelectorLoop.java 7 Oct 2003 20:03:39 -0000 1.59
@@ -235,7 +235,8 @@
if (data.length==0 || destination ==null) throw new IOException ("no
data to send?");
- if (!checkValid(destination))return false;
+ if (!checkValid(destination, client))
+ return false;
SendJob job = new SendJob(data,destination,client, priority);
@@ -255,7 +256,8 @@
if (len==0 || destination==null) throw new IOException ("no data to
send?");
- if (!checkValid(destination))return false;
+ if (!checkValid(destination, client))
+ return false;
SendJob job = new SendJob(data,offset,len,destination,client,priority);
@@ -270,13 +272,14 @@
return true;
}
- private final boolean checkValid(SelectableChannel destination) {
+ private final boolean checkValid(SelectableChannel destination,
+ NIOWriter
client) {
//if we are already registered, return false
SelectionKey key = destination.keyFor(sel);
if (key != null && key.isValid()) {
- if(logDebug)
- Core.logger.log(this, "Send failed due to valid key",
- Logger.DEBUG);
+ Core.logger.log(this, "Send failed due to valid key for "+
+ destination+":"+client,
+ new Exception("debug"),
Logger.ERROR);
return false;
}
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs