/* add.c - ldap ldbm back-end add routine */
/* $OpenLDAP$ */
/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
return( -1 );
}
- rc = entry_schema_check( e, NULL, &text, textbuf, textlen );
+ rc = entry_schema_check( be, e, NULL, &text, textbuf, textlen );
if ( rc != LDAP_SUCCESS ) {
ldap_pvt_thread_mutex_unlock(&li->li_add_mutex);
/* get parent with writer lock */
if ( (p = dn2entry_w( be, &pdn, &matched )) == NULL ) {
char *matched_dn = NULL;
- struct berval **refs;
+ BVarray refs;
ldap_pvt_thread_mutex_unlock(&li->li_add_mutex);
refs == NULL ? "parent does not exist" : "parent is referral",
refs, NULL );
- ber_bvecfree( refs );
+ bvarray_free( refs );
free( matched_dn );
return -1;
if ( is_entry_referral( p ) ) {
/* parent is a referral, don't allow add */
char *matched_dn = ch_strdup( p->e_dn );
- struct berval **refs = is_entry_referral( p )
+ BVarray refs = is_entry_referral( p )
? get_entry_referrals( be, conn, op, p )
: NULL;
send_ldap_result( conn, op, LDAP_REFERRAL,
matched_dn, NULL, refs, NULL );
- ber_bvecfree( refs );
+ bvarray_free( refs );
free( matched_dn );
return -1;
}