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/ModifyDNOperation.java |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/ModifyDNOperation.java b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
index bdb7f6a..03caba5 100644
--- a/opends/src/server/org/opends/server/core/ModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
@@ -1798,6 +1798,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();
+          logModifyDNResponse(this);
+          return;
+        }
+
+
         // Actually perform the modify DN operation.  This should include taking
         // care of any synchronization that might be needed.
         try

--
Gitblit v1.10.0