src/com/netscape/admin/dirserv/panel/LogPanel.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit d55444d7439a487857b3a4ad9870eef84123a2f0
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Mon Mar 7 11:25:42 2011 -0800
Bug 504803 - Allow nsslapd-*-logmaxdiskspace to be set to -1 in UI
It is not currently possible to set the total log maximum disk
space parameter to "-1" in the Console for the access log or the
error log. This is a valid parameter in the server that means
"unlimited".
The problem is that the validation method wants to ensure that the
max disk space is not less than the size configured for a single log
file. We should not perform this check if the max disk space is
unlimited (-1).
diff --git a/src/com/netscape/admin/dirserv/panel/LogPanel.java
b/src/com/netscape/admin/dirserv/panel/LogPanel.java
index 6744df3..395085c 100644
--- a/src/com/netscape/admin/dirserv/panel/LogPanel.java
+++ b/src/com/netscape/admin/dirserv/panel/LogPanel.java
@@ -596,7 +596,9 @@ abstract public class LogPanel extends BlankPanel {
try {
int logSizeValue = Integer.parseInt(logSize);
int maxDiskSpaceValue = Integer.parseInt(maxDiskSpace);
- if (logSizeValue > maxDiskSpaceValue) {
+ // If max disk space is unlimited (-1), there's no need to compare
+ // it with the individual log size.
+ if ((maxDiskSpaceValue >= 0) && (logSizeValue > maxDiskSpaceValue)) {
setChangeState(_lLogSize, CHANGE_STATE_ERROR );
setChangeState(_lMaxDiskSpace, CHANGE_STATE_ERROR );
clearValidFlag();
Show replies by date