Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- added cleanup for unused server loggings: they are removed after the client had not been seen since one hour - removed configBasic popup trigger when no password is set

orbiter9bef20b53783
diff --git a/build.properties b/build.properties
index cc4e2a13e..6137aa6ea 100644
--- a/build.properties
+++ b/build.properties
@@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5
# Release Configuration
-releaseVersion=0.587
+releaseVersion=0.588
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
diff --git a/htroot/AccessTracker_p.java b/htroot/AccessTracker_p.java
index 838585fda..7ef23c226 100644
--- a/htroot/AccessTracker_p.java
+++ b/htroot/AccessTracker_p.java
@@ -81,7 +81,7 @@ public class AccessTracker_p {
prop.putNum("page_list_" + entCount + "_countHour", access.tailMap(new Long(System.currentTimeMillis() - 1000 * 60 * 60)).size());
entCount++;
}
- } catch (ConcurrentModificationException e) {} // we dont want to synchronize this
+ } catch (ConcurrentModificationException e) {} // we don't want to synchronize this
prop.put("page_list", entCount);
prop.put("page_num", entCount);
@@ -112,7 +112,7 @@ public class AccessTracker_p {
prop.putHTML("page_list_" + entCount + "_path", (String) entry.getValue());
entCount++;
}
- } catch (ConcurrentModificationException e) {} // we dont want to synchronize this
+ } catch (ConcurrentModificationException e) {} // we don't want to synchronize this
}
} else {
try {
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 1f3e66e19..54f587d43 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -1823,6 +1823,9 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// close unused connections
JakartaCommonsHttpClient.cleanup();
+ // clean up too old connection information
+ super.cleanupAccessTracker(1000 * 60 * 60);
+
// do transmission of CR-files
checkInterruption();
int count = rankingOwnDistribution.size() / 100;
diff --git a/source/de/anomic/server/serverAbstractSwitch.java b/source/de/anomic/server/serverAbstractSwitch.java
index f8388fd08..bcbcf4d85 100644
--- a/source/de/anomic/server/serverAbstractSwitch.java
+++ b/source/de/anomic/server/serverAbstractSwitch.java
@@ -172,6 +172,16 @@ public abstract class serverAbstractSwitch<E> implements serverSwitch<E> {
return log;
}
+ /*
+ * remove all entries from the access tracker where the age of the last access is greater than the given timeout
+ */
+ public void cleanupAccessTracker(long timeout) {
+ Iterator<Map.Entry<String, TreeMap<Long, String>>> i = accessTracker.entrySet().iterator();
+ while (i.hasNext()) {
+ if (i.next().getValue().tailMap(new Long(System.currentTimeMillis() - timeout)).size() == 0) i.remove();
+ }
+ }
+
public void track(String host, String accessPath) {
// learn that a specific host has accessed a specific path
if (accessPath == null) accessPath="NULL";
diff --git a/source/yacy.java b/source/yacy.java
index 3a1c03647..d368cd9bc 100644
--- a/source/yacy.java
+++ b/source/yacy.java
@@ -354,8 +354,8 @@ public final class yacy {
final boolean browserPopUpTrigger = sb.getConfig("browserPopUpTrigger", "true").equals("true");
if (browserPopUpTrigger) {
String browserPopUpPage = sb.getConfig("browserPopUpPage", "ConfigBasic.html");
- boolean properPW = (sb.getConfig("adminAccount", "").length() == 0) && (sb.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "").length() > 0);
- if (!properPW) browserPopUpPage = "ConfigBasic.html";
+ //boolean properPW = (sb.getConfig("adminAccount", "").length() == 0) && (sb.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "").length() > 0);
+ //if (!properPW) browserPopUpPage = "ConfigBasic.html";
final String browserPopUpApplication = sb.getConfig("browserPopUpApplication", "netscape");
serverSystem.openBrowser((server.withSSL()?"https":"http") + "://localhost:" + serverCore.getPortNr(port) + "/" + browserPopUpPage, browserPopUpApplication);
}