corrected wrong default peer-names

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@454 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent cdbbfd50fb
commit b8e294f149

@ -91,8 +91,12 @@ public class yacyPeerActions {
} }
public void updateMySeed() { public void updateMySeed() {
if (sb.getConfig("peerName", "nameless").equals("nameless")) if (sb.getConfig("peerName", "nameless").equals("nameless")) {
sb.setConfig("peerName", serverCore.publicIP().getHostName() + yacyCore.speedKey + serverSystem.infoKey() + (System.currentTimeMillis() & 99)); // generate new peer name
String newPeerName = serverCore.publicIP().getHostName() + yacyCore.speedKey + serverSystem.infoKey() + (System.currentTimeMillis() & 99);
newPeerName = newPeerName.replace('.', '_');
sb.setConfig("peerName", newPeerName);
}
seedDB.mySeed.put("Name", sb.getConfig("peerName", "nameless")); seedDB.mySeed.put("Name", sb.getConfig("peerName", "nameless"));
if ((serverCore.portForwardingEnabled) && (serverCore.portForwarding != null)) { if ((serverCore.portForwardingEnabled) && (serverCore.portForwarding != null)) {
seedDB.mySeed.put("Port", Integer.toString(serverCore.portForwarding.getPort())); seedDB.mySeed.put("Port", Integer.toString(serverCore.portForwarding.getPort()));

Loading…
Cancel
Save