From 9bef20b537838de694ba9df076c4854d3655f20c Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 2 Jun 2008 21:49:59 +0000 Subject: [PATCH] - 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 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4875 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- build.properties | 2 +- htroot/AccessTracker_p.java | 4 ++-- source/de/anomic/plasma/plasmaSwitchboard.java | 3 +++ source/de/anomic/server/serverAbstractSwitch.java | 10 ++++++++++ source/yacy.java | 4 ++-- 5 files changed, 18 insertions(+), 5 deletions(-) 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 implements serverSwitch { 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>> 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); }