mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
fix ITS#2289 (don't use shared data for search state; use msgid instead)
This commit is contained in:
parent
7759f75d76
commit
d8756a1c98
2 changed files with 18 additions and 19 deletions
|
|
@ -113,6 +113,7 @@ meta_back_compare(
|
|||
struct berval mapped_value = ava->aa_value;
|
||||
|
||||
if ( lsc->candidate != META_CANDIDATE ) {
|
||||
msgid[ i ] = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +159,6 @@ meta_back_compare(
|
|||
&ava->aa_value, &mapped_value, 0 );
|
||||
|
||||
if ( mapped_value.bv_val == NULL ) {
|
||||
lsc->candidate = META_NOT_CANDIDATE;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
|
|
@ -168,7 +168,6 @@ meta_back_compare(
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -180,11 +179,6 @@ meta_back_compare(
|
|||
*/
|
||||
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 );
|
||||
}
|
||||
|
|
@ -195,6 +189,10 @@ meta_back_compare(
|
|||
free( mapped_value.bv_val );
|
||||
}
|
||||
|
||||
if ( msgid[ i ] == -1 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
++candidates;
|
||||
}
|
||||
|
||||
|
|
@ -210,7 +208,7 @@ meta_back_compare(
|
|||
int lrc;
|
||||
LDAPMessage *res = NULL;
|
||||
|
||||
if ( lsc->candidate != META_CANDIDATE ) {
|
||||
if ( msgid[ i ] == -1 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -267,10 +265,11 @@ meta_back_compare(
|
|||
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 );
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@ meta_back_search(
|
|||
char *mapped_filter, **mapped_attrs;
|
||||
|
||||
if ( lsc->candidate != META_CANDIDATE ) {
|
||||
msgid[ i ] = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -250,7 +251,7 @@ meta_back_search(
|
|||
/*
|
||||
* this target is no longer candidate
|
||||
*/
|
||||
lsc->candidate = META_NOT_CANDIDATE;
|
||||
msgid[ i ] = -1;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
|
@ -273,7 +274,7 @@ meta_back_search(
|
|||
/*
|
||||
* this target is no longer candidate
|
||||
*/
|
||||
lsc->candidate = META_NOT_CANDIDATE;
|
||||
msgid[ i ] = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -386,11 +387,6 @@ meta_back_search(
|
|||
*/
|
||||
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;
|
||||
|
|
@ -404,6 +400,10 @@ meta_back_search(
|
|||
mbase = NULL;
|
||||
}
|
||||
|
||||
if ( msgid[ i ] == -1 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
++candidates;
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ meta_back_search(
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ meta_back_search(
|
|||
* When no candidates are left,
|
||||
* the outer cycle finishes
|
||||
*/
|
||||
lsc->candidate = META_NOT_CANDIDATE;
|
||||
msgid[ i ] = -1;
|
||||
--candidates;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue