/* FIXME : dn2entry() should return non-glue entry */
if ( e == NULL || ( !manageDSAit && is_entry_glue( e ))) {
- BerVarray deref = NULL;
-
Debug( LDAP_DEBUG_ARGS,
"<=- " LDAP_XSTRING(bdb_delete) ": no such object %s\n",
op->o_req_dn.bv_val, 0, 0);
matched = NULL;
} else {
- if ( op->o_bd->be_syncinfo ) {
- syncinfo_t *si = op->o_bd->be_syncinfo;
- {
- struct berval tmpbv;
- ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
- ber_bvarray_add( &deref, &tmpbv );
- }
- } else {
- deref = default_referral;
- }
- rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
- LDAP_SCOPE_DEFAULT );
+ rs->sr_ref = referral_rewrite( default_referral, NULL,
+ &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
rs->sr_err = LDAP_REFERRAL;
if ( rs->sr_ref != default_referral ) {
ber_bvarray_free( rs->sr_ref );
}
- if ( deref != default_referral ) {
- ber_bvarray_free( deref );
- }
free( (char *)rs->sr_matched );
rs->sr_ref = NULL;
rs->sr_matched = NULL;
if (( rs->sr_err == DB_NOTFOUND ) ||
( !manageDSAit && e && is_entry_glue( e )))
{
- BerVarray deref = NULL;
if ( e != NULL ) {
rs->sr_matched = ch_strdup( e->e_dn );
rs->sr_ref = is_entry_referral( e )
e = NULL;
} else {
- if ( op->o_bd->be_syncinfo ) {
- syncinfo_t *si = op->o_bd->be_syncinfo;
- {
- struct berval tmpbv;
- ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
- ber_bvarray_add( &deref, &tmpbv );
- }
- } else {
- deref = default_referral;
- }
- rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
- LDAP_SCOPE_DEFAULT );
+ rs->sr_ref = referral_rewrite( default_referral, NULL,
+ &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
rs->sr_err = LDAP_REFERRAL;
if ( rs->sr_ref != default_referral ) {
ber_bvarray_free( rs->sr_ref );
}
- if ( deref != default_referral ) {
- ber_bvarray_free( deref );
- }
free( (char *)rs->sr_matched );
rs->sr_ref = NULL;
rs->sr_matched = NULL;
if (( rs->sr_err == DB_NOTFOUND ) ||
( !manageDSAit && e && is_entry_glue( e )))
{
- BerVarray deref = NULL;
if( e != NULL ) {
rs->sr_matched = ch_strdup( e->e_dn );
rs->sr_ref = is_entry_referral( e )
e = NULL;
} else {
- if ( op->o_bd->be_syncinfo ) {
- syncinfo_t *si = op->o_bd->be_syncinfo;
- {
- struct berval tmpbv;
- ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
- ber_bvarray_add( &deref, &tmpbv );
- }
- } else {
- deref = default_referral;
- }
- rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
- LDAP_SCOPE_DEFAULT );
+ rs->sr_ref = referral_rewrite( default_referral, NULL,
+ &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
rs->sr_err = LDAP_REFERRAL;
send_ldap_result( op, rs );
ber_bvarray_free( rs->sr_ref );
- if ( deref != default_referral ) {
- ber_bvarray_free( deref );
- }
free( (char *)rs->sr_matched );
rs->sr_ref = NULL;
rs->sr_matched = NULL;
/* FIXME : dn2entry() should return non-glue entry */
if ( e == NULL || ( !manageDSAit && is_entry_glue( e ))) {
- BerVarray deref = NULL;
-
Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: no such object %s\n",
op->o_req_dn.bv_val, 0, 0);
cache_return_entry_r( &li->li_cache, matched );
} else {
- if ( op->o_bd->be_syncinfo ) {
- syncinfo_t *si = op->o_bd->be_syncinfo;
- {
- struct berval tmpbv;
- ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
- ber_bvarray_add( &deref, &tmpbv );
- }
- } else {
- deref = default_referral;
- }
- rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
- LDAP_SCOPE_DEFAULT );
+ rs->sr_ref = referral_rewrite( default_referral, NULL,
+ &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
send_ldap_result( op, rs );
if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
- if ( deref != default_referral ) {
- ber_bvarray_free( deref );
- }
free( (char *)rs->sr_matched );
rs->sr_ref = NULL;
rs->sr_matched = NULL;
/* FIXME: dn2entry() should return non-glue entry */
if (( e == NULL ) || ( !manageDSAit && e && is_entry_glue( e ))) {
- BerVarray deref = NULL;
if ( matched != NULL ) {
rs->sr_matched = ch_strdup( matched->e_dn );
rs->sr_ref = is_entry_referral( matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
- if ( op->o_bd->be_syncinfo ) {
- syncinfo_t *si = op->o_bd->be_syncinfo;
- {
- struct berval tmpbv;
- ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
- ber_bvarray_add( &deref, &tmpbv );
- }
- } else {
- deref = default_referral;
- }
- rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
- LDAP_SCOPE_DEFAULT );
+ rs->sr_ref = referral_rewrite( default_referral, NULL,
+ &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
send_ldap_result( op, rs );
if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
- if ( deref != default_referral ) {
- ber_bvarray_free( deref );
- }
free( (char *)rs->sr_matched );
rs->sr_ref = NULL;
/* get entry with writer lock */
/* FIXME: dn2entry() should return non-glue entry */
if (( e == NULL ) || ( !manageDSAit && e && is_entry_glue( e ))) {
- BerVarray deref = NULL;
if ( matched != NULL ) {
rs->sr_matched = strdup( matched->e_dn );
rs->sr_ref = is_entry_referral( matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
- if ( op->o_bd->be_syncinfo ) {
- syncinfo_t *si = op->o_bd->be_syncinfo;
- {
- struct berval tmpbv;
- ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
- ber_bvarray_add( &deref, &tmpbv );
- }
- } else {
- deref = default_referral;
- }
- rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
- LDAP_SCOPE_DEFAULT );
+ rs->sr_ref = referral_rewrite( default_referral, NULL,
+ &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
send_ldap_result( op, rs );
if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
- if ( deref != default_referral ) {
- ber_bvarray_free( deref );
- }
free( (char *)rs->sr_matched );
rs->sr_ref = NULL;
rs->sr_matched = NULL;