defer thread key retrieve as it might not be needed

This commit is contained in:
Pierangelo Masarati 2007-08-16 10:05:21 +00:00
parent 2f5bfba296
commit f7a6c4360c
2 changed files with 11 additions and 3 deletions

View File

@ -64,7 +64,7 @@ meta_back_bind( Operation *op, SlapReply *rs )
gotit = 0,
isroot = 0;
SlapReply *candidates = meta_back_candidates_get( op );
SlapReply *candidates;
rs->sr_err = LDAP_SUCCESS;
@ -122,6 +122,8 @@ meta_back_bind( Operation *op, SlapReply *rs )
return rs->sr_err;
}
candidates = meta_back_candidates_get( op );
/*
* Each target is scanned ...
*/
@ -324,6 +326,9 @@ meta_back_bind_op_result(
">>> %s meta_back_bind_op_result[%d]\n",
op->o_log_prefix, candidate, 0 );
/* make sure this is clean */
assert( rs->sr_ctrls == NULL );
if ( rs->sr_err == LDAP_SUCCESS ) {
time_t stoptime = (time_t)(-1),
timeout;
@ -634,7 +639,7 @@ meta_back_dobind(
i,
isroot = 0;
SlapReply *candidates = meta_back_candidates_get( op );
SlapReply *candidates;
if ( be_isroot( op ) ) {
isroot = 1;
@ -654,6 +659,8 @@ meta_back_dobind(
goto done;
}
candidates = meta_back_candidates_get( op );
for ( i = 0; i < mi->mi_ntargets; i++ ) {
metatarget_t *mt = mi->mi_targets[ i ];
metasingleconn_t *msc = &mc->mc_conns[ i ];

View File

@ -680,7 +680,7 @@ meta_back_search( Operation *op, SlapReply *rs )
dncookie dc;
int is_ok = 0;
void *savepriv;
SlapReply *candidates = meta_back_candidates_get( op );
SlapReply *candidates = NULL;
/*
* controls are set in ldap_back_dobind()
@ -697,6 +697,7 @@ getconn:;
dc.conn = op->o_conn;
dc.rs = rs;
if ( candidates == NULL ) candidates = meta_back_candidates_get( op );
/*
* Inits searches
*/