Update of /cvsroot/freenet/freenet/src/freenet/node/states/FNP
In directory sc8-pr-cvs1:/tmp/cvs-serv20740/src/freenet/node/states/FNP

Modified Files:
        FNPFeedbackToken.java 
Log Message:
6169:
Send DataRequests asynchronously too. We get a SendFinished back. If it's unsuccessful 
we route to the next node... Minor fixes to SendFinished handling in different states.
If we have more than 2 connections, and one of them is not sending a trailer, queue 
messages to that conn despite it being over the limits. Should limit connection open 
floods... at the expense of monstrous message send times.
Make sending QueryRejected's asynchronous (relatively obscure cases, the majority are 
already covered).
Increase messageStoreSize to 10,000 because I was getting lost non-RequestDone 
messages.
Some more work on routing termination.
Send more DataNotFound's async.
Major bugfixes in OCM.createConn.
Don't set priority of WSL/RSL to max. Looked like it might be starving stuff.
Ignore SendFinished in RequestDone.
Logging, indenting, style, etc.


Index: FNPFeedbackToken.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/FNP/FNPFeedbackToken.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- FNPFeedbackToken.java       3 Sep 2003 18:10:13 -0000       1.18
+++ FNPFeedbackToken.java       4 Sep 2003 22:45:06 -0000       1.19
@@ -21,13 +21,20 @@
         this.id      = id;
         this.origPeer = origPeer;
     }
-
-    public final void queryRejected(Node n, int htl, String reason, FieldSet fs,
-                                    int unreachable, int restarted, int rejected)
-                                                throws CommunicationException {
-        n.sendMessage(new QueryRejected(id, htl, reason, fs), origPeer);
+    
+    public final void queryRejected(Node n, int htl, String reason, 
+                                   FieldSet fs, int unreachable, 
+                                   int restarted, int rejected,
+                                   MessageSendCallback cb)
+       throws CommunicationException {
+       Message m = new QueryRejected(id, htl, reason, fs);
+       ConnectionHandler ch = n.makeConnection(origPeer, 0);
+       if(cb == null)
+           ch.sendMessage(m);
+       else
+           ch.sendMessageAsync(m, cb);
     }
-
+    
     public final void restarted(Node n, long millis, MessageSendCallback cb) 
        throws CommunicationException {
        Message m = new QueryRestarted(id);

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to