Skip to content

Commit

Permalink
fixed bugs in remote search setting for public clusters
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3615 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Apr 28, 2007
1 parent 485bf1e commit f73e1e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions htroot/yacysearch.java
Expand Up @@ -185,8 +185,8 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
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

Expand Down
7 changes: 6 additions & 1 deletion source/de/anomic/yacy/yacySearch.java
Expand Up @@ -155,7 +155,12 @@ private static yacySeed[] selectClusterPeers(TreeSet peerhashes) {
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) {
Expand Down

0 comments on commit f73e1e3

Please sign in to comment.