Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
add uses of config constant INDEX_RECEIVE_ALLOW
regerfcad2d07445b
diff --git a/htroot/IndexShare_p.java b/htroot/IndexShare_p.javaindex 028023d06..6f17a2749 100644--- a/htroot/IndexShare_p.java+++ b/htroot/IndexShare_p.java@@ -57,7 +57,7 @@ public class IndexShare_p {if (post.containsKey("indexsharesetting")) {sb.setConfig(SwitchboardConstants.INDEX_DIST_ALLOW, post.containsKey("distribute"));- sb.setConfig("allowReceiveIndex", post.containsKey("receive"));+ sb.setConfig(SwitchboardConstants.INDEX_RECEIVE_ALLOW, post.containsKey("receive"));sb.setConfig("defaultLinkReceiveFrequency", post.getInt("linkfreq", 30));sb.setConfig("defaultWordReceiveFrequency", post.getInt("wordfreq", 10));}diff --git a/htroot/yacy/transferRWI.java b/htroot/yacy/transferRWI.javaindex 62fcb9b38..ebe707162 100644--- a/htroot/yacy/transferRWI.java+++ b/htroot/yacy/transferRWI.java@@ -116,7 +116,7 @@ public final class transferRWI {final int wordc = post.getInt("wordc", 0); // number of different wordsfinal int entryc = post.getInt("entryc", 0); // number of entries in indexesbyte[] indexes = post.get("indexes", "").getBytes(); // the indexes, as list of word entries- boolean granted = sb.getConfigBool("allowReceiveIndex", false);+ boolean granted = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW, false);final boolean blockBlacklist = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_BLOCK_BLACKLIST, false);final long cachelimit = sb.getConfigLong(SwitchboardConstants.WORDCACHE_MAX_COUNT, 100000);final Seed otherPeer = sb.peers.get(iam);diff --git a/htroot/yacy/transferURL.java b/htroot/yacy/transferURL.javaindex 980bd276a..192a1c931 100644--- a/htroot/yacy/transferURL.java+++ b/htroot/yacy/transferURL.java@@ -68,7 +68,7 @@ public final class transferURL {final String youare = post.get("youare", ""); // seed hash of the target peer, needed for network stability// final String key = post.get("key", ""); // transmission keyfinal int urlc = post.getInt("urlc", 0); // number of transported urls- final boolean granted = sb.getConfigBool("allowReceiveIndex", false);+ final boolean granted = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW, false);final boolean blockBlacklist = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_BLOCK_BLACKLIST, false);// response valuesdiff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex 47630bf54..b5ccadbf7 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -112,9 +112,7 @@ import net.yacy.cora.order.NaturalOrder;import net.yacy.cora.protocol.ClientIdentification;import net.yacy.cora.protocol.ConnectionInfo;import net.yacy.cora.protocol.Domains;-import net.yacy.cora.protocol.HeaderFramework;import net.yacy.cora.protocol.RequestHeader;-import net.yacy.cora.protocol.ResponseHeader;import net.yacy.cora.protocol.TimeoutRequest;import net.yacy.cora.protocol.ftp.FTPClient;import net.yacy.cora.protocol.http.HTTPClient;@@ -3901,7 +3899,7 @@ public final class Switchboard extends serverSwitch {mySeed.setLastSeenUTC();mySeed.put(Seed.UTC, GenericFormatter.UTCDiffString());mySeed.setFlagAcceptRemoteCrawl(getConfigBool(SwitchboardConstants.CRAWLJOB_REMOTE, false));- mySeed.setFlagAcceptRemoteIndex(getConfigBool("allowReceiveIndex", true));+ mySeed.setFlagAcceptRemoteIndex(getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW, true));mySeed.setFlagSSLAvailable(this.getHttpServer() != null && this.getHttpServer().withSSL() && getConfigBool("server.https", false));if (mySeed.getFlagSSLAvailable()) mySeed.put(Seed.PORTSSL, Integer.toString(getPublicPort("port.ssl", 8443)));