From: Howard Chu Date: Tue, 27 Jul 2021 17:06:23 +0000 (+0100) Subject: ITS#6138 use SLAPD_NO_REPLY for persistent searches X-Git-Tag: OPENLDAP_REL_ENG_2_6_0~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=795add7b96697ccf85b0459a3988e724084645dd;p=thirdparty%2Fopenldap.git ITS#6138 use SLAPD_NO_REPLY for persistent searches The particular code doesn't matter, any result besides SLAP_CB_CONTINUE always halts overlay/response processing. --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 5eba1b3ff6..9a277ec40a 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2890,9 +2890,6 @@ syncprov_detach_op( Operation *op, syncops *so, slap_overinst *on ) op->o_conn->c_n_ops_completed--; LDAP_STAILQ_INSERT_TAIL( &op->o_conn->c_ops, op2, o_next ); so->s_flags |= PS_IS_DETACHED; - - /* Prevent anyone else from trying to send a result for this op */ - op->o_abandon = 1; } static int @@ -3032,9 +3029,8 @@ syncprov_search_response( Operation *op, SlapReply *rs ) if ( ss->ss_so->s_res ) syncprov_qstart( ss->ss_so ); ldap_pvt_thread_mutex_unlock( &ss->ss_so->s_mutex ); + return SLAPD_NO_REPLY; } - - return LDAP_SUCCESS; } } diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index aa6a014079..bfb24500ab 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -159,6 +159,9 @@ LDAP_BEGIN_DECL /* pseudo error code indicating async operation */ #define SLAPD_ASYNCOP (-1027) +/* pseudo error code to suppress frontend response */ +#define SLAPD_NO_REPLY (-1028) + /* We assume "C" locale, that is US-ASCII */ #define ASCII_SPACE(c) ( (c) == ' ' ) #define ASCII_LOWER(c) ( (c) >= 'a' && (c) <= 'z' )