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/protocols/ldap/LDAPResultCode.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
index 114cb18..3e9552c 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
@@ -582,6 +582,21 @@
 
 
   /**
+   * The LDAP result code for operations in which no action is taken because the
+   * request include the LDAP no-op control.
+   *
+   * FIXME -- This is a temporary result code for use until
+   *          draft-zeilenga-ldap-noop is updated and an official result code is
+   *          allocated for it.  In the meantime, this result appears to be the
+   *          one used by OpenLDAP as per the message at
+   *          http://www.openldap.org/lists/openldap-devel/200601/msg00143.html
+   *          (0x410e = 16654).
+   */
+  public static final int NO_OPERATION = 16654;
+
+
+
+  /**
    * Retrieves a string representation of the provided LDAP result code.
    *
    * @param  resultCode  The LDAP result code value for which to obtain the
@@ -787,6 +802,9 @@
       case AUTHORIZATION_DENIED:
         msgID = MSGID_RESULT_AUTHORIZATION_DENIED;
         break;
+      case NO_OPERATION:
+        msgID = MSGID_RESULT_NO_OPERATION;
+        break;
       default:
         msgID = MSGID_RESULT_OTHER;
         break;

--
Gitblit v1.10.0