Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv6483/src/freenet

Modified Files:
        Version.java 
Log Message:
6285: seal the breach. 1.47/1.46 is now interchangeable. Preparatory for stable merge, 
which is imminent.


Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.479
retrieving revision 1.480
diff -u -w -r1.479 -r1.480
--- Version.java        28 Oct 2003 05:09:53 -0000      1.479
+++ Version.java        28 Oct 2003 18:59:48 -0000      1.480
@@ -18,7 +18,7 @@
     public static String protocolVersion = "1.47";
     
     /** The build number of the current revision */
-    public static final int buildNumber = 6284;
+    public static final int buildNumber = 628m;
     // 6028: may 3; ARK retrieval fix
 
     public static final int ignoreBuildsAfter = 6500;
@@ -60,6 +60,14 @@
        return checkGoodVersion(version, false);
     }
     
+    private static boolean goodProtocol(String prot) {
+       if(prot.equals(protocolVersion)) return true;
+       // Messy NGRouting merge - FIXME
+       if(protocolVersion.equals("1.47") &&
+          prot.equals("1.46")) return true;
+       return false;
+    }
+    
     /**
      * @return  true if requests should be accepted from nodes
      *          brandishing this version string
@@ -69,7 +77,7 @@
     public static final boolean checkGoodVersion(String version,
                                                 boolean reference) {
         String[] v = Fields.commaList(version);
-        if (v.length < 3 || !v[2].equals(protocolVersion)) {
+        if (v.length < 3 || !goodProtocol(v[2])) {
             return false;
         }
         if (sameVersion(v)) {
@@ -94,7 +102,7 @@
      */
     public static final String explainBadVersion(String version) {
         String[] v = Fields.commaList(version);
-        if (v.length < 3 || !v[2].equals(protocolVersion)) {
+        if (v.length < 3 || !goodProtocol(v[2])) {
             return "Required protocol version is "+protocolVersion;
         }
         if (sameVersion(v)) {

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

Reply via email to