From 1e197fe96f072e4a59802682dfa00c78a41b708c Mon Sep 17 00:00:00 2001
From: ctissot <ctissot@localhost>
Date: Thu, 20 Nov 2008 16:33:56 +0000
Subject: [PATCH] Fix issue 3547: Persistent search can not be abandoned
---
opends/src/server/org/opends/server/core/AbandonOperationBasis.java | 37 +++++++++++++++++--------------------
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/AbandonOperationBasis.java b/opends/src/server/org/opends/server/core/AbandonOperationBasis.java
index b3e48f0..74e0ee6 100644
--- a/opends/src/server/org/opends/server/core/AbandonOperationBasis.java
+++ b/opends/src/server/org/opends/server/core/AbandonOperationBasis.java
@@ -244,26 +244,23 @@
// code to reflect whether the abandon was successful and an error message
// if it was not. Even though there is no response, the result should
// still be logged.
- Operation operation =
- clientConnection.getOperationInProgress(idToAbandon);
- if (operation == null)
- {
- setResultCode(ResultCode.NO_SUCH_OPERATION);
- appendErrorMessage(ERR_ABANDON_OP_NO_SUCH_OPERATION.get(idToAbandon));
- }
- else
- {
- // Even though it is technically illegal to send a response for
- // operations that have been abandoned, it may be a good idea to do so
- // to ensure that the requestor isn't left hanging. This will be a
- // configurable option in the server.
- boolean notifyRequestor = DirectoryServer.notifyAbandonedOperations();
- Message cancelReason = INFO_CANCELED_BY_ABANDON_REQUEST.get(messageID);
- CancelResult result =
- operation.cancel(new CancelRequest(notifyRequestor, cancelReason));
- setResultCode(result.getResultCode());
- appendErrorMessage(result.getResponseMessage());
- }
+ //
+ // Even though it is technically illegal to send a response for
+ // operations that have been abandoned, it may be a good idea to do so
+ // to ensure that the requestor isn't left hanging. This will be a
+ // configurable option in the server.
+ boolean notifyRequestor = DirectoryServer.notifyAbandonedOperations();
+
+ Message cancelReason = INFO_CANCELED_BY_ABANDON_REQUEST.get(messageID);
+
+ CancelRequest _cancelRequest = new CancelRequest(notifyRequestor,
+ cancelReason);
+
+ CancelResult result = clientConnection.cancelOperation(idToAbandon,
+ _cancelRequest);
+
+ setResultCode(result.getResultCode());
+ appendErrorMessage(result.getResponseMessage());
PluginResult.PostOperation postOpResult =
pluginConfigManager.invokePostOperationAbandonPlugins(this);
--
Gitblit v1.10.0