Author: nextgens
Date: 2009-04-17 15:23:02 +0000 (Fri, 17 Apr 2009)
New Revision: 26940

Modified:
   branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java
   branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageFilter.java
Log:
Pass the timestamp (save some precious time there)

Modified: branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java
===================================================================
--- branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java       
2009-04-17 15:15:31 UTC (rev 26939)
+++ branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java       
2009-04-17 15:23:02 UTC (rev 26940)
@@ -174,7 +174,7 @@
                                        i.remove();
                                        continue;
                                }
-                               if (f.match(m)) {
+                               if (f.match(m, tStart)) {
                                        matched = true;
                                        i.remove();
                                        match = f;
@@ -334,7 +334,7 @@
                        if(logMINOR) Logger.minor(this, "Checking _unclaimed");
                        for (ListIterator<Message> i = 
_unclaimed.listIterator(); i.hasNext();) {
                                Message m = i.next();
-                               if (filter.match(m)) {
+                               if (filter.match(m, now)) {
                                        i.remove();
                                        ret = m;
                                        if(logMINOR) Logger.debug(this, 
"Matching from _unclaimed");
@@ -406,7 +406,7 @@
                        if(logMINOR) Logger.minor(this, "Checking _unclaimed");
                        for (ListIterator<Message> i = 
_unclaimed.listIterator(); i.hasNext();) {
                                Message m = i.next();
-                               if (filter.match(m)) {
+                               if (filter.match(m,now)) {
                                        i.remove();
                                        ret = m;
                                        if(logMINOR) Logger.minor(this, 
"Matching from _unclaimed");

Modified: 
branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageFilter.java
===================================================================
--- branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageFilter.java     
2009-04-17 15:15:31 UTC (rev 26939)
+++ branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageFilter.java     
2009-04-17 15:23:02 UTC (rev 26940)
@@ -175,8 +175,8 @@
                return this;
        }
        
-       public boolean match(Message m) {
-               if ((_or != null) && (_or.match(m))) {
+       public boolean match(Message m, long now) {
+               if ((_or != null) && (_or.match(m, now))) {
                        return true;
                }
                if ((_type != null) && (!_type.equals(m.getSpec()))) {
@@ -198,7 +198,7 @@
                                }
                        }
                }
-               if(reallyTimedOut(System.currentTimeMillis())) return false;
+               if(reallyTimedOut(now)) return false;
                return true;
        }
 

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to