From d408e72de6b31ec6e44a073beb47c067f09fea78 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 12 Jul 2006 09:23:19 +0000
Subject: [PATCH] - pre-operation plugins are not called anymore when processing synchronization operations   for ADD,DELELTE and MODIFYDN as it was already the case for MODIFY operation   This is necessary to make sure that entries use the same unique ID everywhere.

---
 opends/src/server/org/opends/server/core/DeleteOperation.java |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/DeleteOperation.java b/opends/src/server/org/opends/server/core/DeleteOperation.java
index 0bd6c40..4787692 100644
--- a/opends/src/server/org/opends/server/core/DeleteOperation.java
+++ b/opends/src/server/org/opends/server/core/DeleteOperation.java
@@ -924,26 +924,30 @@
         }
 
 
-        // Invoke the pre-delete plugins.
-        PreOperationPluginResult preOpResult =
-             pluginConfigManager.invokePreOperationDeletePlugins(this);
-        if (preOpResult.connectionTerminated())
+        // If the operation is not a synchronization operation,
+        // invoke the pre-delete plugins.
+        if (!isSynchronizationOperation())
         {
-          // There's no point in continuing with anything.  Log the request and
-          // result and return.
-          setResultCode(ResultCode.CANCELED);
+          PreOperationPluginResult preOpResult =
+            pluginConfigManager.invokePreOperationDeletePlugins(this);
+          if (preOpResult.connectionTerminated())
+          {
+            // There's no point in continuing with anything.  Log the request
+            // and result and return.
+            setResultCode(ResultCode.CANCELED);
 
-          int msgID = MSGID_CANCELED_BY_PREOP_DISCONNECT;
-          appendErrorMessage(getMessage(msgID));
+            int msgID = MSGID_CANCELED_BY_PREOP_DISCONNECT;
+            appendErrorMessage(getMessage(msgID));
 
-          processingStopTime = System.currentTimeMillis();
-          logDeleteResponse(this);
-          return;
-        }
-        else if (preOpResult.sendResponseImmediately())
-        {
-          skipPostOperation = true;
-          break deleteProcessing;
+            processingStopTime = System.currentTimeMillis();
+            logDeleteResponse(this);
+            return;
+          }
+          else if (preOpResult.sendResponseImmediately())
+          {
+            skipPostOperation = true;
+            break deleteProcessing;
+          }
         }
 
 

--
Gitblit v1.10.0