Merge branch 'master' of ssh://git@gitorious.org/yacy/rc1.git

pull/1/head
Michael Peter Christen 13 years ago
commit 77f8e9fb9b

@ -4,7 +4,7 @@
<title>#[former]# - YaCy '#[clientname]#': Search Page</title>
#%env/templates/metas.template%#
<link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?query=#[former]#" />
<link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="opensearchdescription.xml" />
<link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="http://#[thisaddress]#/opensearchdescription.xml" />
<link rel="stylesheet" type="text/css" media="screen" href="/env/highslide.css" />
<script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript" src="/js/xml.js"></script>

@ -1050,9 +1050,10 @@ public class yacysearch {
String hostName = header.get("Host", "localhost");
if ( hostName.indexOf(':', 0) == -1 ) {
hostName += ":" + serverCore.getPortNr(env.getConfig("port", "8090"));
}
}
prop.put("searchBaseURL", "http://" + hostName + "/yacysearch.html");
prop.put("rssYacyImageURL", "http://" + hostName + "/env/grafics/yacy.gif");
prop.put("thisaddress", hostName);
}
prop.put("searchagain", global ? "1" : "0");

@ -21,7 +21,7 @@
<opensearch:totalResults>#[num-results_totalcount]#</opensearch:totalResults>
<opensearch:startIndex>#[num-results_offset]#</opensearch:startIndex>
<opensearch:itemsPerPage>#[num-results_itemsPerPage]#</opensearch:itemsPerPage>
<atom:link rel="related" href="opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<atom:link rel="search" href="http://#[thisaddress]#/opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<opensearch:Query role="request" searchTerms="#[rss_queryenc]#" />
#{results}#
<!--#include virtual="yacysearchitem.xml?item=#[item]#&eventID=#[eventID]#" -->

@ -655,7 +655,7 @@ public final class SeedDB implements AlternativeDomainNames {
public Seed lookupByIP(
final InetAddress peerIP,
final int port,
final int port, /* port may be -1 if not significant */
final boolean lookupConnected,
final boolean lookupDisconnected,
final boolean lookupPotential
@ -679,7 +679,7 @@ public final class SeedDB implements AlternativeDomainNames {
for (byte[] pk: idx) {
seed = this.getConnected(ASCII.String(pk));
if (seed == null) continue;
if (seed.getPort() != port) continue;
if ((port >= 0) && (seed.getPort() != port)) continue;
//System.out.println("*** found lookupByIP in connected: " + peerIP.toString() + " -> " + seed.getName());
return seed;
}
@ -693,7 +693,7 @@ public final class SeedDB implements AlternativeDomainNames {
for (byte[] pk: idx) {
seed = this.getDisconnected(ASCII.String(pk));
if (seed == null) continue;
if (seed.getPort() != port) continue;
if ((port >= 0) && (seed.getPort() != port)) continue;
//System.out.println("*** found lookupByIP in disconnected: " + peerIP.toString() + " -> " + seed.getName());
return seed;
}
@ -707,7 +707,7 @@ public final class SeedDB implements AlternativeDomainNames {
for (byte[] pk: idx) {
seed = this.getPotential(ASCII.String(pk));
if (seed == null) continue;
if (seed.getPort() != port) continue;
if ((port >= 0) && (seed.getPort() != port)) continue;
//System.out.println("*** found lookupByIP in potential: " + peerIP.toString() + " -> " + seed.getName());
return seed;
}
@ -720,7 +720,7 @@ public final class SeedDB implements AlternativeDomainNames {
String s = this.mySeed.getIP();
if (s == null || !ipString.equals(s)) return null;
int p = this.mySeed.getPort();
if (p != port) return null;
if ((port >= 0) && (p != port)) return null;
//System.out.println("*** found lookupByIP as my seed: " + peerIP.toString() + " -> " + this.mySeed.getName());
return this.mySeed;
}

Loading…
Cancel
Save