Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv6962/src/freenet
Modified Files:
Version.java ContactCounter.java
Log Message:
6346: KenMan's patch: Add version to nodes in inboundRequests.txt.
Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.541
retrieving revision 1.542
diff -u -w -r1.541 -r1.542
--- Version.java 21 Nov 2003 00:13:26 -0000 1.541
+++ Version.java 21 Nov 2003 00:26:18 -0000 1.542
@@ -20,7 +20,7 @@
public static String protocolVersion = "1.47";
/** The build number of the current revision */
- public static final int buildNumber = 6345;
+ public static final int buildNumber = 6346;
public static final int ignoreBuildsAfter = 6500;
Index: ContactCounter.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ContactCounter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- ContactCounter.java 5 Jul 2002 23:37:17 -0000 1.2
+++ ContactCounter.java 21 Nov 2003 00:26:19 -0000 1.3
@@ -1,8 +1,10 @@
package freenet;
+import java.lang.String;
import java.util.Hashtable;
import java.util.Enumeration;
import freenet.support.Comparable;
+
public class ContactCounter {
public static class Record implements Cloneable, Comparable {
@@ -10,7 +12,7 @@
public int totalContacts = 1;
public int successes = 0;
public int activeContacts = 0;
-
+ public String version = "";
protected Record(String addr) {
this.addr = addr;
@@ -43,6 +45,18 @@
return -1;
}
}
+
+ public final synchronized void setLastVersion(String addr, String lastVer) {
+ addr = cannonicalAddr(addr);
+ Record entry = (Record)table.get(addr);
+ if (entry == null) {
+ //no need to add an entry for this particular method!
+ //table.put(addr, new Record(addr));
+ }
+ else {
+ entry.version = lastVer;
+ }
+ }
public final synchronized void incTotal(String addr) {
addr = cannonicalAddr(addr);
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs