You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2006/10/05 11:30:39 UTC
svn commit: r453158 -
/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
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 );