Update of /cvsroot/freenet/freenet/src/freenet/node
In directory sc8-pr-cvs1:/tmp/cvs-serv20667/src/freenet/node
Modified Files:
StandardMessageHandler.java
Log Message:
Fixed enqueueing message even though we said to the caller that we didn't during an
onlyRunIfFast call
Index: StandardMessageHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/StandardMessageHandler.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- StandardMessageHandler.java 14 Oct 2003 00:43:14 -0000 1.17
+++ StandardMessageHandler.java 14 Oct 2003 22:57:35 -0000 1.18
@@ -147,30 +147,24 @@
boolean shouldrun = false;
synchronized (workList) {
-
if (!working) {
// Don't run in-thread if other stuff queued
if(onlyRunIfFast) {
- if(!workList.isEmpty()) return false;
+ if(!workList.isEmpty())
+ return false;
}
// Don't run in-thread if not fast
if(onlyRunIfFast && !chain.canRunFast(node, mo))
return false;
- workList.push(new TicketEntry(node, mo));
// it cannot be forgotten while using it
synchronized (ticketTable) {
- //ticketLadder.remove(this);
- this.remove();
+ this.remove(); //Equal to
'ticketLadder.remove(this)'
}
-
working = true;
- //threadFactory.getThread(this, true).start();
shouldrun = true;
- } else {
+ } else
+ if(onlyRunIfFast) return false;//Don't run
in-thread if somebody else is already running
workList.push(new TicketEntry(node, mo));
- // Don't run in-thread if somebody else is already running
- if(onlyRunIfFast) return false;
- }
}
if (shouldrun)
@@ -297,12 +291,3 @@
}
}
}
-
-
-
-
-
-
-
-
-
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs