From d005d7484e49416ea4c34b19ee64da8d402e4904 Mon Sep 17 00:00:00 2001 From: allo Date: Mon, 25 Apr 2005 12:13:49 +0000 Subject: [PATCH] yacyDebugMode - allow Lan-IPs for testing where was the Code from 0.25 lost? git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@53 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/net/natLib.java | 6 +++--- source/de/anomic/yacy/yacyCore.java | 2 +- source/yacy.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/de/anomic/net/natLib.java b/source/de/anomic/net/natLib.java index f0da54fd5..df3026bf0 100644 --- a/source/de/anomic/net/natLib.java +++ b/source/de/anomic/net/natLib.java @@ -137,12 +137,12 @@ public class natLib { return null; } - public static String retrieveIP(boolean DI604, String password) { + public static String retrieveIP(boolean DI604, String password, boolean yacyDebugMode) { String ip; if (DI604) { // first try the simple way... ip = getDI604(password); - if (isProper(ip)) { + if (isProper(ip)||yacyDebugMode) { //System.out.print("{DI604}"); return ip; } @@ -152,7 +152,7 @@ public class natLib { InetAddress ia = serverCore.publicIP(); if (ia != null) { ip = ia.getHostAddress(); - if (isProper(ip)) return ip; + if (isProper(ip)||yacyDebugMode) return ip; } // now go the uneasy way and ask some web responder diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.java index 9822deda7..a8456c99c 100644 --- a/source/de/anomic/yacy/yacyCore.java +++ b/source/de/anomic/yacy/yacyCore.java @@ -361,7 +361,7 @@ public class yacyCore { // still no success: ask own NAT or internet responder boolean DI604use = switchboard.getConfig("DI604use", "false").equals("true"); String DI604pw = switchboard.getConfig("DI604pw", ""); - String ip = natLib.retrieveIP(DI604use, DI604pw); + String ip = natLib.retrieveIP(DI604use, DI604pw, (switchboard.getConfig("yacyDebugMode", "false")=="false" ? false : true)); //System.out.println("DEBUG: new IP=" + ip); seedDB.mySeed.put("IP", ip); if (seedDB.mySeed.get("PeerType", "junior").equals("junior")) // ??????????????? diff --git a/source/yacy.java b/source/yacy.java index 66fb40c6a..55668804c 100644 --- a/source/yacy.java +++ b/source/yacy.java @@ -79,7 +79,7 @@ public final class yacy { // static objects private static final String vString = "@REPL_VERSION@"; - private static final String vDATE = "@REPL_DATE@"; + private static final String vDATE = "20050420"; private static final String copyright = "[ YACY Proxy v" + vString + ", build " + vDATE + " by Michael Christen / www.yacy.net ]"; private static final String hline = "-------------------------------------------------------------------------------";