From b33098b962b9e07e1aa578dc4ef5738122922692 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 28 Apr 2005 18:49:24 +0000 Subject: [PATCH] Propagate SLAPD_ABANDON results to to allow cleanup callbacks to run --- servers/slapd/result.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 37a91b6837..aa90811c82 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -327,6 +327,11 @@ send_ldap_response( int rc = LDAP_SUCCESS; long bytes; + if ( rs->sr_err == SLAPD_ABANDON ) { + rc = SLAPD_ABANDON; + goto clean2; + } + if ( op->o_callback ) { int first = 1; slap_callback *sc = op->o_callback, @@ -568,6 +573,10 @@ slap_send_ldap_result( Operation *op, SlapReply *rs ) rs->sr_type = REP_RESULT; + /* Propagate Abandons so that cleanup callbacks can be processed */ + if ( rs->sr_err == SLAPD_ABANDON ) + goto abandon; + assert( !LDAP_API_ERROR( rs->sr_err )); Debug( LDAP_DEBUG_TRACE, @@ -631,6 +640,7 @@ slap_send_ldap_result( Operation *op, SlapReply *rs ) rs->sr_tag = req2res( op->o_tag ); rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0; +abandon: if ( send_ldap_response( op, rs ) == SLAP_CB_CONTINUE ) { if ( op->o_tag == LDAP_REQ_SEARCH ) { char nbuf[64]; -- 2.39.5