Skip to content

Commit

Permalink
*) fixed static ip beeing cleared when no port was given
Browse files Browse the repository at this point in the history
*) fixed static ip beeing enabled although it was cleaned to ""

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3198 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
auron_x committed Jan 13, 2007
1 parent 4dce5ec commit 6ac0021
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions htroot/SettingsAck_p.java
Expand Up @@ -294,19 +294,17 @@ else if (!filter.equals("*")){

// static IP
String staticIP = ((String) post.get("staticIP")).trim();
if (staticIP.startsWith("http://")) {
if (staticIP.length() > 7) { staticIP = staticIP.substring(7); } else { staticIP = ""; }
} else if (staticIP.startsWith("https://")) {
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
}
if (staticIP.indexOf(":") > 0) {
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
}
if (staticIP.length() == 0) {
serverCore.useStaticIP = false;
} else {
if (staticIP.startsWith("http://")) {
if (staticIP.length() > 7) { staticIP = staticIP.substring(7); } else { staticIP = ""; }
} else if (staticIP.startsWith("https://")) {
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
}
if (staticIP.indexOf(":") > 0) {
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
} else {
staticIP = "";
}
serverCore.useStaticIP = true;
}
yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);
Expand Down

0 comments on commit 6ac0021

Please sign in to comment.