Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

local Bootstrapping bug. use yacyDebugMode=true to allow local bootstrapping

alloeb6365c06930
diff --git a/source/de/anomic/net/natLib.java b/source/de/anomic/net/natLib.java
index 5103a4822..d3fe10f53 100644
--- a/source/de/anomic/net/natLib.java
+++ b/source/de/anomic/net/natLib.java
@@ -48,6 +48,7 @@ import de.anomic.http.httpc;
import de.anomic.server.serverCore;
import de.anomic.tools.disorderHeap;
import de.anomic.tools.nxTools;
+import de.anomic.plasma.plasmaSwitchboard;
public class natLib {
@@ -122,9 +123,14 @@ public class natLib {
}
public static boolean isProper(String ip) {
+ plasmaSwitchboard sb=plasmaSwitchboard.getSwitchboard();
+ String yacyDebugMode = sb.getConfig("yacyDebugMode", "false");
+ if(yacyDebugMode.equals("true")){
+ return true;
+ }
if (ip == null) return false;
if (ip.indexOf(":") >= 0) return false; // ipv6...
- return ((isNotLocal(ip)) && (isIP(ip)));
+ return ( isNotLocal(ip)) && (isIP(ip) );
}
private static int retrieveOptions() {
@@ -139,12 +145,12 @@ public class natLib {
return null;
}
- public static String retrieveIP(boolean DI604, String password, boolean yacyDebugMode) {
+ public static String retrieveIP(boolean DI604, String password) {
String ip;
if (DI604) {
// first try the simple way...
ip = getDI604(password);
- if (isProper(ip)||yacyDebugMode) {
+ if (isProper(ip)) {
//System.out.print("{DI604}");
return ip;
}
@@ -154,7 +160,7 @@ public class natLib {
InetAddress ia = serverCore.publicIP();
if (ia != null) {
ip = ia.getHostAddress();
- if (isProper(ip)||yacyDebugMode) return ip;
+ if (isProper(ip)) return ip;
}
// now go the uneasy way and ask some web responder
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 0bade23d8..de77596d8 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -189,6 +189,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
private Object crawlingPausedSync = new Object();
private boolean crawlingIsPaused = false;
+ private static plasmaSwitchboard sb;
public plasmaSwitchboard(String rootPath, String initPath, String configPath) throws IOException {
super(rootPath, initPath, configPath);
@@ -404,8 +405,13 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
//plasmaSnippetCache.result scr = snippetCache.retrieve(new URL("http://www.heise.de/security/news/foren/go.shtml?read=1&msg_id=7301419&forum_id=72721"), query, true);
//plasmaSnippetCache.result scr = snippetCache.retrieve(new URL("http://www.heise.de/kiosk/archiv/ct/2003/4/20"), query, true, 260);
+ sb=this;
log.logSystem("Finished Switchboard Initialization");
}
+
+ public static plasmaSwitchboard getSwitchboard(){
+ return sb;
+ }
public boolean onlineCaution() {
try {
diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.java
index 7ac640c32..fecb75ba6 100644
--- a/source/de/anomic/yacy/yacyCore.java
+++ b/source/de/anomic/yacy/yacyCore.java
@@ -470,7 +470,7 @@ public class yacyCore {
String DI604pw = switchboard.getConfig("DI604pw", "");
String ip = switchboard.getConfig("staticIP", "");
if(ip.equals("")){
- ip = natLib.retrieveIP(DI604use, DI604pw, (switchboard.getConfig("yacyDebugMode", "false")=="false" ? false : true));
+ ip = natLib.retrieveIP(DI604use, DI604pw);
}
//yacyCore.log.logDebug("DEBUG: new IP=" + ip);
seedDB.mySeed.put("IP", ip);