Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for http://forum.yacy-websuche.de/viewtopic.php?p=14457#p14457
orbiterd31e6f9c1467
diff --git a/htroot/ConfigNetwork_p.java b/htroot/ConfigNetwork_p.javaindex 29e2ee920..5b14e1e46 100644--- a/htroot/ConfigNetwork_p.java+++ b/htroot/ConfigNetwork_p.java@@ -207,7 +207,10 @@ public class ConfigNetwork_p {prop.put("robinson.checked", (indexDistribute || indexReceive) ? "0" : "1");prop.putHTML("cluster.peers.ipport", sb.getConfig("cluster.peers.ipport", ""));prop.putHTML("cluster.peers.yacydomain", sb.getConfig("cluster.peers.yacydomain", ""));- prop.put("cluster.peers.yacydomain.hashes", (sb.clusterhashes.size() == 0) ? "" : sb.clusterhashes.toString());+ String hashes = "";+ for (byte[] h:sb.clusterhashes.keySet()) hashes += ", " + new String(h);+ if (hashes.length() > 2) hashes = hashes.substring(2);+ prop.put("cluster.peers.yacydomain.hashes", hashes);// set p2p mode flagsprop.put("privatepeerChecked", (sb.getConfig("cluster.mode", "").equals("privatepeer")) ? "1" : "0");diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 95f704c52..2e20e609b 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -924,7 +924,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.return network.indexOf(peer) >= 0;} else if (clustermode.equals(plasmaSwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER)) {// check if we got the request from a peer in the public cluster- return this.clusterhashes.containsKey(peer);+ return this.clusterhashes.containsKey(peer.getBytes());} else {return false;}@@ -942,7 +942,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.return network.indexOf(seed.getPublicAddress()) >= 0;} else if (clustermode.equals(plasmaSwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER)) {// check if we got the request from a peer in the public cluster- return this.clusterhashes.containsKey(seed.hash);+ return this.clusterhashes.containsKey(seed.hash.getBytes());} else {return false;}diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.javaindex c827df363..5fcb10d82 100644--- a/source/de/anomic/yacy/yacyCore.java+++ b/source/de/anomic/yacy/yacyCore.java@@ -310,19 +310,19 @@ public class yacyCore {// add also all peers from cluster if this is a public robinson clusterif (ch != null) {final Iterator<Map.Entry<byte[], String>> i = ch.entrySet().iterator();- byte[] hash;+ String hash;Map.Entry<byte[], String> entry;yacySeed seed;while (i.hasNext()) {entry = i.next();- hash = entry.getKey();+ hash = new String(entry.getKey());seed = seeds.get(hash);if (seed == null) {- seed = sb.webIndex.peers().get(new String(hash));+ seed = sb.webIndex.peers().get(hash);if (seed == null) continue;}seed.setAlternativeAddress(entry.getValue());- seeds.put(new String(hash), seed);+ seeds.put(hash, seed);}}} else {