*) To avoid confusion location will now also be displayed for own peer

See: http://www.yacy-forum.de/viewtopic.php?p=17283#17283

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1692 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 851493624f
commit aa87df35e1

@ -51,6 +51,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.io.IOException;
import de.anomic.http.httpHeader;
import de.anomic.http.httpc;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.server.serverDate;
@ -312,7 +313,12 @@ public class Network {
}
prop.put(STR_TABLE_LIST + conCount + "_shortname", shortname);
prop.put(STR_TABLE_LIST + conCount + "_fullname", seed.get(yacySeed.NAME, "deadlink"));
userAgent = yacyCore.peerActions.getUserAgent(seed.getIP());
userAgent = null;
if (seed.hash.equals(yacyCore.seedDB.mySeed.hash)) {
userAgent = httpc.userAgent;
} else {
userAgent = yacyCore.peerActions.getUserAgent(seed.getIP());
}
p = userAgent.lastIndexOf(';');
location = (p > 0) ? userAgent.substring(p + 1, userAgent.length() - 1).trim(): "";
prop.put(STR_TABLE_LIST + conCount + "_location", location);

@ -104,7 +104,7 @@ public final class httpc {
// statics
private static final String vDATE = "20040602";
private static String userAgent;
public static String userAgent;
private static final int terminalMaxLength = 30000;
private static final TimeZone GMTTimeZone = TimeZone.getTimeZone("GMT");
/**

Loading…
Cancel
Save