Update of /cvsroot/freenet/freenet/src/freenet/client/http
In directory sc8-pr-cvs1:/tmp/cvs-serv26517/src/freenet/client/http

Modified Files:
        NodeStatusServlet.java 
Log Message:
6319:
Probabilistic rejection, based on work by Benny Amorsen.
Make a distinction in stats between rejecting nearly all requests, and rejecting most 
requests.
Make NewAnnouncement use the Node.acceptRequest() method rather than rejectingRequests 
so it works with prejecting.
Don't accept requests just because they are in the failtable, they have to be likely 
to be DNFed by it.

Index: NodeStatusServlet.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/client/http/NodeStatusServlet.java,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -w -r1.80 -r1.81
--- NodeStatusServlet.java      7 Nov 2003 18:17:15 -0000       1.80
+++ NodeStatusServlet.java      7 Nov 2003 21:47:44 -0000       1.81
@@ -550,7 +550,9 @@
         // It's not just thread based.  There's also a hard
         // rate limit.
         StringBuffer whyRejectingRequests = new StringBuffer(500);
-        boolean rejectingRequests = node.rejectingRequests(whyRejectingRequests);
+        boolean rejectingRequests = node.rejectingRequests(whyRejectingRequests, 
true);
+        boolean rejectingMostRequests = rejectingRequests ? false :
+                                                                                      
                           node.rejectingRequests(whyRejectingRequests, false);
         StringBuffer whyRejectingConnections = new StringBuffer(500);
         boolean rejectingConnections = 
node.rejectingConnections(whyRejectingConnections);
 
@@ -560,10 +562,12 @@
             if (rejectingConnections) {
                 color = "red"; 
                 comment = " &nbsp; <b> [Rejecting incoming connections and requests!] 
</b> ";
-            }
-            else if (rejectingRequests) {
+            } else if (rejectingRequests) {
                 color = "red"; 
                 comment = " &nbsp; <b> [QueryRejecting all incoming requests!] </b> ";
+            } else if (rejectingMostRequests) {
+               color = "blue";
+               comment = " &nbsp; <b> [QueryRejecting most incoming requests]</b> ";
             }
 
             String msg = Integer.toString(jobs);

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

Reply via email to