mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
partially revert prev commit
This commit is contained in:
parent
86d9e86afd
commit
9a65f35f2e
@ -2138,8 +2138,7 @@ strval2str( struct berval *val, char *str, unsigned flags, ber_len_t *len )
|
|||||||
* there might be some chars we want to escape in form
|
* there might be some chars we want to escape in form
|
||||||
* of a couple of hexdigits for optimization purposes
|
* of a couple of hexdigits for optimization purposes
|
||||||
*/
|
*/
|
||||||
if ( cl > 1 ) {
|
if ( ( cl > 1 && !LDAP_DN_IS_PRETTY( flags ) )
|
||||||
if ( !LDAP_DN_IS_PRETTY( flags )
|
|
||||||
#ifdef PRETTY_ESCAPE
|
#ifdef PRETTY_ESCAPE
|
||||||
#if 0
|
#if 0
|
||||||
|| LDAP_DN_WILLESCAPE_HEX( flags, val->bv_val[ s ] )
|
|| LDAP_DN_WILLESCAPE_HEX( flags, val->bv_val[ s ] )
|
||||||
@ -2154,17 +2153,16 @@ strval2str( struct berval *val, char *str, unsigned flags, ber_len_t *len )
|
|||||||
|
|
||||||
#endif /* ! PRETTY_ESCAPE */
|
#endif /* ! PRETTY_ESCAPE */
|
||||||
) {
|
) {
|
||||||
for ( ; cl--; ) {
|
for ( ; cl--; ) {
|
||||||
str[ d++ ] = '\\';
|
str[ d++ ] = '\\';
|
||||||
byte2hexpair( &val->bv_val[ s ], &str[ d ] );
|
byte2hexpair( &val->bv_val[ s ], &str[ d ] );
|
||||||
s++;
|
s++;
|
||||||
d += 2;
|
d += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else if ( cl > 1 ) {
|
||||||
for ( ; cl--; ) {
|
for ( ; cl--; ) {
|
||||||
str[ d++ ] = val->bv_val[ s++ ];
|
str[ d++ ] = val->bv_val[ s++ ];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user