struct berval mapped_value = ava->aa_value;
if ( lsc->candidate != META_CANDIDATE ) {
+ msgid[ i ] = -1;
continue;
}
&ava->aa_value, &mapped_value, 0 );
if ( mapped_value.bv_val == NULL ) {
- lsc->candidate = META_NOT_CANDIDATE;
continue;
}
/*
ldap_back_map( &li->targets[ i ]->at_map,
&ava->aa_desc->ad_cname, &mapped_attr, 0 );
if ( mapped_attr.bv_val == NULL ) {
- lsc->candidate = META_NOT_CANDIDATE;
continue;
}
}
*/
msgid[ i ] = ldap_compare( lc->conns[ i ].ld, mdn,
mapped_attr.bv_val, mapped_value.bv_val );
- if ( msgid[ i ] == -1 ) {
- lsc->candidate = META_NOT_CANDIDATE;
- continue;
- }
-
if ( mdn != dn->bv_val ) {
free( mdn );
}
free( mapped_value.bv_val );
}
+ if ( msgid[ i ] == -1 ) {
+ continue;
+ }
+
++candidates;
}
int lrc;
LDAPMessage *res = NULL;
- if ( lsc->candidate != META_CANDIDATE ) {
+ if ( msgid[ i ] == -1 ) {
continue;
}
last = i;
break;
}
- lsc->candidate = META_NOT_CANDIDATE;
+ msgid[ i ] = -1;
--candidates;
+
} else {
- lsc->candidate = META_NOT_CANDIDATE;
+ msgid[ i ] = -1;
--candidates;
if ( res ) {
ldap_msgfree( res );
char *mapped_filter, **mapped_attrs;
if ( lsc->candidate != META_CANDIDATE ) {
+ msgid[ i ] = -1;
continue;
}
/*
* this target is no longer candidate
*/
- lsc->candidate = META_NOT_CANDIDATE;
+ msgid[ i ] = -1;
continue;
}
break;
/*
* this target is no longer candidate
*/
- lsc->candidate = META_NOT_CANDIDATE;
+ msgid[ i ] = -1;
continue;
}
*/
msgid[ i ] = ldap_search( lsc->ld, mbase, realscope,
mapped_filter, mapped_attrs, attrsonly );
- if ( msgid[ i ] == -1 ) {
- lsc->candidate = META_NOT_CANDIDATE;
- continue;
- }
-
if ( mapped_attrs ) {
free( mapped_attrs );
mapped_attrs = NULL;
mbase = NULL;
}
+ if ( msgid[ i ] == -1 ) {
+ continue;
+ }
+
++candidates;
}
ab = op->o_abandon;
for ( i = 0, lsc = lc->conns; !META_LAST(lsc); lsc++, i++ ) {
- if ( lsc->candidate != META_CANDIDATE ) {
+ if ( msgid[ i ] == -1 ) {
continue;
}
* When no candidates are left,
* the outer cycle finishes
*/
- lsc->candidate = META_NOT_CANDIDATE;
+ msgid[ i ] = -1;
--candidates;
}
}