Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
refactoring
lotus9f7e62e9001d
diff --git a/source/de/anomic/net/UPnP.java b/source/de/anomic/net/UPnP.javaindex d7be4c543..40d921867 100644--- a/source/de/anomic/net/UPnP.java+++ b/source/de/anomic/net/UPnP.java@@ -43,7 +43,7 @@ import de.anomic.plasma.plasmaSwitchboardConstants;public class UPnP {public final static Log log = new Log("UPNP");- private static plasmaSwitchboard sb;+ private static plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();private final static int discoveryTimeout = 5000; // seconds to receive a response from devicesprivate static InternetGatewayDevice[] IGDs = null;@@ -60,10 +60,6 @@ public class UPnP {System.setProperty("net.sbbi.upnp.ddos.matchip", "false");} */- public static void setSb(plasmaSwitchboard switchboard) {- sb = switchboard;- }-public static boolean setIGDs(InternetGatewayDevice[] igds) {if(IGDs == null) {IGDs = igds; // set only once to prevent many same devices by advertisement events@@ -203,7 +199,7 @@ public class UPnP {log.logInfo("discovered device: " + newIGD[0].getIGDRootDevice().getFriendlyName());if (UPnP.setIGDs(newIGD) &&plasmaSwitchboard.getSwitchboard().getConfigBool(plasmaSwitchboardConstants.UPNP_ENABLED, false))- UPnP.addPortMapping();+ UPnP.addPortMapping();Listener.unregister();}diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex d7599ca5b..5d2041d95 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -264,7 +264,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.if (applyPro) this.log.logInfo("This is the pro-version of YaCy");// UPnP port mapping- UPnP.setSb(sb);if (getConfigBool(plasmaSwitchboardConstants.UPNP_ENABLED, false))serverInstantBusyThread.oneTimeJob(UPnP.class, "addPortMapping", UPnP.log, 0);