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/workflowelement/localbackend/LocalBackendWorkflowElement.java |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java b/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
index 1fe984b..3fd4599 100644
--- a/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
+++ b/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
@@ -2067,7 +2067,7 @@
           {
             localOp.appendErrorMessage(getMessage(MSGID_MODIFY_NOOP));
 
-            // FIXME -- We must set a result code other than SUCCESS.
+            localOp.setResultCode(ResultCode.NO_OPERATION);
           }
           else
           {
@@ -2267,7 +2267,10 @@
             localOp.getResponseControls().add(responseControl);
           }
 
-          localOp.setResultCode(ResultCode.SUCCESS);
+          if (! noOp)
+          {
+            localOp.setResultCode(ResultCode.SUCCESS);
+          }
         }
         catch (DirectoryException de)
         {
@@ -5563,7 +5566,7 @@
             {
               localOp.appendErrorMessage(getMessage(MSGID_ADD_NOOP));
 
-              // FIXME -- We must set a result code other than SUCCESS.
+              localOp.setResultCode(ResultCode.NO_OPERATION);
             }
             else
             {
@@ -5652,7 +5655,11 @@
               localOp.addResponseControl(responseControl);
             }
 
-            localOp.setResultCode(ResultCode.SUCCESS);
+
+            if (! noOp)
+            {
+              localOp.setResultCode(ResultCode.SUCCESS);
+            }
           }
           catch (DirectoryException de)
           {
@@ -6387,7 +6394,7 @@
           {
             localOp.appendErrorMessage(getMessage(MSGID_DELETE_NOOP));
 
-            // FIXME -- We must set a result code other than SUCCESS.
+            localOp.setResultCode(ResultCode.NO_OPERATION);
           }
           else
           {
@@ -6476,7 +6483,11 @@
             localOp.addResponseControl(responseControl);
           }
 
-          localOp.setResultCode(ResultCode.SUCCESS);
+
+          if (! noOp)
+          {
+            localOp.setResultCode(ResultCode.SUCCESS);
+          }
         }
         catch (DirectoryException de)
         {

--
Gitblit v1.10.0