mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 15:49:34 -05:00
Fix entry encode/decode logging
This commit is contained in:
parent
45b0ae2e7d
commit
371f8efb9c
1 changed files with 12 additions and 11 deletions
|
|
@ -340,13 +340,10 @@ int entry_decode( struct berval *bv, Entry **entry )
|
|||
ber_len_t len;
|
||||
char *last;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "=> entry_decode\n",
|
||||
0, 0, 0 );
|
||||
|
||||
ber = ber_init( bv );
|
||||
if( ber == NULL ) {
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"<= entry_encode: ber_init failed\n",
|
||||
"<= entry_decode: ber_init failed\n",
|
||||
0, 0, 0 );
|
||||
return LDAP_LOCAL_ERROR;
|
||||
}
|
||||
|
|
@ -356,7 +353,7 @@ int entry_decode( struct berval *bv, Entry **entry )
|
|||
|
||||
if( e == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"<= entry_encode: entry allocation failed\n",
|
||||
"<= entry_decode: entry allocation failed\n",
|
||||
0, 0, 0 );
|
||||
return LDAP_LOCAL_ERROR;
|
||||
}
|
||||
|
|
@ -375,7 +372,7 @@ int entry_decode( struct berval *bv, Entry **entry )
|
|||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"entry_encode: \"%s\"\n",
|
||||
"entry_decode: \"%s\"\n",
|
||||
e->e_dn, 0, 0 );
|
||||
|
||||
/* get the attrs */
|
||||
|
|
@ -415,7 +412,7 @@ int entry_decode( struct berval *bv, Entry **entry )
|
|||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"<= str2entry: str2undef_ad(%s): %s\n",
|
||||
"<= entry_decode: str2undef_ad(%s): %s\n",
|
||||
type, text, 0 );
|
||||
ber_bvfree( type );
|
||||
ber_bvecfree( vals );
|
||||
|
|
@ -446,8 +443,8 @@ int entry_decode( struct berval *bv, Entry **entry )
|
|||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
Debug(LDAP_DEBUG_TRACE, "<= entry_decode(%s) -> 0x%lx\n",
|
||||
e->e_dn, (unsigned long) e, 0 );
|
||||
Debug(LDAP_DEBUG_TRACE, "<= entry_decode(%s)\n",
|
||||
e->e_dn, 0, 0 );
|
||||
|
||||
*entry = e;
|
||||
return LDAP_SUCCESS;
|
||||
|
|
@ -461,8 +458,8 @@ int entry_encode(
|
|||
Attribute *a;
|
||||
BerElement *ber;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "=> entry_encode\n",
|
||||
0, 0, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE, "=> entry_encode(0x%08lx): %s\n",
|
||||
e->e_id, e->e_dn, 0 );
|
||||
|
||||
ber = ber_alloc_t( LBER_USE_DER );
|
||||
if( ber == NULL ) {
|
||||
|
|
@ -492,6 +489,10 @@ int entry_encode(
|
|||
|
||||
done:
|
||||
ber_free( ber, 1 );
|
||||
if( rc ) {
|
||||
Debug( LDAP_DEBUG_ANY, "=> entry_encode(0x%08lx): failed (%d)\n",
|
||||
e->e_id, rc, 0 );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue