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

diff --git a/opends/src/server/org/opends/server/core/ModifyDNOperation.java b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
index 2198891..7307842 100644
--- a/opends/src/server/org/opends/server/core/ModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
@@ -1558,26 +1558,30 @@
         int modCount = modifications.size();
 
 
+        // If the operation is not a synchronization operation,
         // Invoke the pre-operation modify DN plugins.
-        PreOperationPluginResult preOpResult =
-             pluginConfigManager.invokePreOperationModifyDNPlugins(this);
-        if (preOpResult.connectionTerminated())
+        if (!isSynchronizationOperation())
         {
-          // There's no point in continuing with anything.  Log the request and
-          // result and return.
-          setResultCode(ResultCode.CANCELED);
+          PreOperationPluginResult preOpResult =
+            pluginConfigManager.invokePreOperationModifyDNPlugins(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();
-          logModifyDNResponse(this);
-          return;
-        }
-        else if (preOpResult.sendResponseImmediately())
-        {
-          skipPostOperation = true;
-          break modifyDNProcessing;
+            processingStopTime = System.currentTimeMillis();
+            logModifyDNResponse(this);
+            return;
+          }
+          else if (preOpResult.sendResponseImmediately())
+          {
+            skipPostOperation = true;
+            break modifyDNProcessing;
+          }
         }
 
 

--
Gitblit v1.10.0