From: Ondřej Kuzník Date: Fri, 23 Aug 2024 11:57:34 +0000 (+0100) Subject: ITS#10248 Always generate a result on the original op X-Git-Tag: OPENLDAP_REL_ENG_2_5_19~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f37b1543223257343031688ef037749bf422cd8;p=thirdparty%2Fopenldap.git ITS#10248 Always generate a result on the original op --- diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 0b2fa4c37e..18fea165c8 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -801,8 +801,8 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) { tc = op->o_callback->sc_private; - /* Don't let the op complete while we're gathering data */ - if ( rs->sr_type == REP_RESULT && ( tc->step & USE_LIST )) + /* We took over the op, don't let it complete yet */ + if ( rs->sr_type == REP_RESULT ) return 0; if(rs->sr_type != REP_SEARCH || !rs->sr_entry) @@ -1229,9 +1229,9 @@ static int translucent_search(Operation *op, SlapReply *rs) { rs->sr_flags = 0; rs->sr_entry = NULL; } - send_ldap_result( op, rs ); } + send_ldap_result( op, rs ); op->ors_slimit = tc.slimit; /* Free in reverse order */