From 5529b81d9211826fa6c47f59753031a51aa56f6e Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Wed, 24 Sep 2008 15:33:46 +0000
Subject: [PATCH] 3493: LDAP Error message is repeated 3 times

---
 opends/src/server/org/opends/server/core/AddOperationBasis.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/AddOperationBasis.java b/opends/src/server/org/opends/server/core/AddOperationBasis.java
index aca00cb..355a4ad 100644
--- a/opends/src/server/org/opends/server/core/AddOperationBasis.java
+++ b/opends/src/server/org/opends/server/core/AddOperationBasis.java
@@ -110,7 +110,8 @@
   // The change number that has been assigned to this operation.
   private long changeNumber;
 
-
+  // The flag indicates if  an LDAP error was reported.
+  private boolean ldapError;
   /**
    * Creates a new add operation with the provided information.
    *
@@ -358,8 +359,8 @@
    */
   private final void computeObjectClassesAndAttributes()
   {
-    if ((objectClasses == null) || (userAttributes == null) ||
-        (operationalAttributes == null))
+    if (((objectClasses == null) || (userAttributes == null) ||
+        (operationalAttributes == null))  && !ldapError)
     {
       objectClasses         = new HashMap<ObjectClass,String>();
       userAttributes        = new HashMap<AttributeType,List<Attribute>>();
@@ -387,6 +388,7 @@
               objectClasses = null;
               userAttributes = null;
               operationalAttributes = null;
+              ldapError = true;
               return;
             }
           }
@@ -460,6 +462,7 @@
           objectClasses = null;
           userAttributes = null;
           operationalAttributes = null;
+          ldapError = true;
         }
       }
     }

--
Gitblit v1.10.0