From eac34cf772dc341c7a57eab1dee3101b08066efb Mon Sep 17 00:00:00 2001 From: borg-0300 Date: Tue, 30 Aug 2005 16:28:59 +0000 Subject: [PATCH] no negative values See http://www.yacy-forum.de/viewtopic.php?t=1021 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@611 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/ProxyIndexingMonitor_p.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htroot/ProxyIndexingMonitor_p.java b/htroot/ProxyIndexingMonitor_p.java index c4a2ae5af..e2679c995 100644 --- a/htroot/ProxyIndexingMonitor_p.java +++ b/htroot/ProxyIndexingMonitor_p.java @@ -82,6 +82,8 @@ public class ProxyIndexingMonitor_p { if (post.containsKey("proxyprofileset")) try { // read values and put them in global settings int newProxyPrefetchDepth = Integer.parseInt((String) post.get("proxyPrefetchDepth", "0")); + if (newProxyPrefetchDepth < 0) newProxyPrefetchDepth = 0; + if (newProxyPrefetchDepth > 25) newProxyPrefetchDepth = 25; // self protection ? env.setConfig("proxyPrefetchDepth", Integer.toString(newProxyPrefetchDepth)); boolean proxyStoreHTCache = ((String) post.get("proxyStoreHTCache", "")).equals("on"); env.setConfig("proxyStoreHTCache", (proxyStoreHTCache) ? "true" : "false");