From 8aaa16f43f88550cbe7a8a2ddad12a917e845488 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 05 Jul 2007 05:56:48 +0000
Subject: [PATCH] Update the server processing for the LDAP no-op control so that it uses a nonzero result code.  For now, we're using a result code of 16654 (0x410e, which is what OpenLDAP uses).  If a new specification is released with an official OID and result code, then we'll use them.

---
 opends/src/server/org/opends/server/core/ModifyDNOperation.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/ModifyDNOperation.java b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
index 9c01614..979f3ac 100644
--- a/opends/src/server/org/opends/server/core/ModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
@@ -1819,7 +1819,7 @@
           {
             appendErrorMessage(getMessage(MSGID_MODDN_NOOP));
 
-            // FIXME -- We must set a result code other than SUCCESS.
+            setResultCode(ResultCode.NO_OPERATION);
           }
           else
           {
@@ -1957,7 +1957,11 @@
             responseControls.add(responseControl);
           }
 
-          setResultCode(ResultCode.SUCCESS);
+
+          if (! noOp)
+          {
+            setResultCode(ResultCode.SUCCESS);
+          }
         }
         catch (DirectoryException de)
         {

--
Gitblit v1.10.0