fixed bugs in remote search setting for public clusters

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3615 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 485bf1ea83
commit f73e1e3af9

@ -185,8 +185,8 @@ public class yacysearch {
final boolean indexReceiveGranted = sb.getConfig("allowReceiveIndex", "true").equals("true");
final boolean offline = yacyCore.seedDB.mySeed.isVirgin();
final boolean clustersearch = sb.isRobinsonMode() &&
(sb.getConfig("clustermode", "").equals("privatecluster") ||
sb.getConfig("clustermode", "").equals("publiccluster"));
(sb.getConfig("cluster.mode", "").equals("privatecluster") ||
sb.getConfig("cluster.mode", "").equals("publiccluster"));
if (offline || !indexDistributeGranted || !indexReceiveGranted) { global = false; }
if (clustersearch) global = true; // switches search on, but search target is limited to cluster nodes

@ -155,7 +155,12 @@ public class yacySearch extends Thread {
s = yacyCore.seedDB.getConnected((String) i.next());
if (s != null) l.add(s);
}
return (yacySeed[]) l.toArray();
yacySeed[] result = new yacySeed[l.size()];
for (int j = 0; j < l.size(); j++) {
result[j] = (yacySeed) l.get(j);
}
return result;
//return (yacySeed[]) l.toArray();
}
private static yacySeed[] selectDHTPeers(Set wordhashes, int seedcount) {

Loading…
Cancel
Save