directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r453158 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Date Thu, 05 Oct 2006 09:30:39 GMT
Author: elecharny
Date: Thu Oct  5 02:30:38 2006
New Revision: 453158

URL: http://svn.apache.org/viewvc?view=rev&rev=453158
Log:
Fixed DIRSERVER-756

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java?view=diff&rev=453158&r1=453157&r2=453158
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Thu Oct  5 02:30:38 2006
@@ -102,6 +102,9 @@
     /** The DN that is matched by the Bind */
     private LdapDN matchedDN;
 
+    /** Temporary storage of the byte[] representing the matchedDN */
+    private transient byte[] matchedDNBytes;
+
     /** The error message */
     private String errorMessage;
     
@@ -263,7 +266,8 @@
         }
         else
         {
-            ldapResultLength += 1 + TLV.getNbBytes( LdapDN.getNbBytes( matchedDN ) ) + LdapDN.getNbBytes(
matchedDN );
+            matchedDNBytes = StringTools.getBytesUtf8( matchedDN.getUpName() );
+            ldapResultLength += 1 + TLV.getNbBytes( matchedDNBytes.length ) + matchedDNBytes.length;
         }
 
         // The errorMessage length
@@ -318,7 +322,7 @@
         }
 
         // The matchedDN
-        Value.encode( buffer, LdapDN.getBytes( matchedDN ) );
+        Value.encode( buffer, matchedDNBytes );
 
         // The error message
         Value.encode( buffer, errorMessageBytes );



Mime
View raw message