From e1862b6b8d276a6719f1277a7ca9781a1294180c Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sat, 23 Sep 2006 19:27:42 +0000
Subject: [PATCH] Update the delete, modify, modify DN, and search operations to add a check for a cancel between the pre-operation plugin processing and sending the request to the backend.
---
opends/src/server/org/opends/server/core/DeleteOperation.java | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DeleteOperation.java b/opends/src/server/org/opends/server/core/DeleteOperation.java
index f052974..13185af 100644
--- a/opends/src/server/org/opends/server/core/DeleteOperation.java
+++ b/opends/src/server/org/opends/server/core/DeleteOperation.java
@@ -971,6 +971,31 @@
}
+ // Check for and handle a request to cancel this operation.
+ if (cancelRequest != null)
+ {
+ setCancelResult(CancelResult.CANCELED);
+
+ if (cancelRequest.notifyOriginalRequestor() ||
+ DirectoryServer.notifyAbandonedOperations())
+ {
+ setResultCode(ResultCode.CANCELED);
+
+ String cancelReason = cancelRequest.getCancelReason();
+ if (cancelReason != null)
+ {
+ appendErrorMessage(cancelReason);
+ }
+
+ clientConnection.sendResponse(this);
+ }
+
+ processingStopTime = System.currentTimeMillis();
+ logDeleteResponse(this);
+ return;
+ }
+
+
// Get the backend to use for the delete. If there is none, then fail.
Backend backend = DirectoryServer.getBackend(entryDN);
if (backend == null)
--
Gitblit v1.10.0