From: Howard Chu Date: Thu, 28 Apr 2005 18:49:24 +0000 (+0000) Subject: Propagate SLAPD_ABANDON results to to allow cleanup callbacks to run X-Git-Tag: OPENLDAP_AC_BP~770 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b33098b962b9e07e1aa578dc4ef5738122922692;p=openldap Propagate SLAPD_ABANDON results to to allow cleanup callbacks to run --- 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];