Debug(LDAP_DEBUG_TRACE, "bdb_dn2entry: dn: \"%s\"\n",
dn, 0, 0 );
+ *e = NULL;
+
if( matched != NULL ) {
+ *matched = NULL;
rc = bdb_dn2id_matched( be, tid, dn, &id, &matchedDN );
} else {
rc = bdb_dn2id( be, tid, dn, &id );
}
return rc;
-}
\ No newline at end of file
+}
e = (Entry *) ch_malloc( sizeof(Entry) );
if( e == NULL ) {
- Debug( LDAP_DEBUG_TRACE,
+ Debug( LDAP_DEBUG_ANY,
"<= entry_encode: entry allocation failed\n",
0, 0, 0 );
return LDAP_LOCAL_ERROR;
e->e_attrs = NULL;
e->e_private = NULL;
- rc = ber_scanf( ber, "{ss" /*"}"*/, &e->e_dn, &e->e_ndn );
- if( rc < 0 ) {
+ tag = ber_scanf( ber, "{aa" /*"}"*/, &e->e_dn, &e->e_ndn );
+ if( tag == LBER_ERROR ) {
free( e );
return LDAP_PROTOCOL_ERROR;
}
+ Debug( LDAP_DEBUG_TRACE,
+ "entry_encode: \"%s\"\n",
+ e->e_dn, 0, 0 );
+
/* get the attrs */
for ( tag = ber_first_element( ber, &len, &last );
tag != LBER_DEFAULT;
AttributeDescription *ad;
const char *text;
- rc = ber_scanf( ber, "{O{V}}", &type, &vals );
+ tag = ber_scanf( ber, "{O{V}}", &type, &vals );
- if ( rc == LBER_ERROR ) {
+ if ( tag == LBER_ERROR ) {
Debug( LDAP_DEBUG_ANY, "entry_decode: decoding error\n", 0, 0, 0 );
entry_free( e );
return LDAP_PROTOCOL_ERROR;