From 12528a2548d419b1d48d1ec70f0f9ae3a94c0b20 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 23 Oct 2009 19:44:22 +0000
Subject: [PATCH] Fix for issue 4313 (Control-panel stop triggers authentication pop-up) After getting the return code from stop-ds, verify that the server released its lock on the file used to test that it is running.
---
opends/src/guitools/org/opends/guitools/controlpanel/task/StartStopTask.java | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/task/StartStopTask.java b/opends/src/guitools/org/opends/guitools/controlpanel/task/StartStopTask.java
index 69d182a..00be3e0 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/task/StartStopTask.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/task/StartStopTask.java
@@ -38,7 +38,7 @@
import org.opends.messages.Message;
/**
- * An abstract class used to refactor some code between the start, stop and
+ * An abstract class used to re-factor some code between the start, stop and
* restart tasks.
*
*/
@@ -98,8 +98,8 @@
// To display new status
try
{
- getInfo().regenerateDescriptor();
getInfo().stopPooling();
+ getInfo().regenerateDescriptor();
ArrayList<String> arguments = getCommandLineArguments();
@@ -108,14 +108,7 @@
arguments.toArray(args);
returnCode = executeCommandLine(getCommandLinePath(), args);
- if (returnCode != 0)
- {
- state = State.FINISHED_WITH_ERROR;
- }
- else
- {
- state = State.FINISHED_SUCCESSFULLY;
- }
+ postCommandLine();
}
catch (Throwable t)
{
@@ -133,4 +126,20 @@
ArrayList<String> args = new ArrayList<String>();
return args;
}
+
+ /**
+ * Method called just after calling the command-line. To be overwritten
+ * by the inheriting classes.
+ */
+ protected void postCommandLine()
+ {
+ if (returnCode != 0)
+ {
+ state = State.FINISHED_WITH_ERROR;
+ }
+ else
+ {
+ state = State.FINISHED_SUCCESSFULLY;
+ }
+ }
}
--
Gitblit v1.10.0