From: Howard Chu Date: Fri, 13 Oct 2017 17:46:18 +0000 (+0100) Subject: Revert "ITS#8752 ppolicy: don't call same cleanup twice" X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03ee55d7250f29c71e2f7f453668e9d71aa627b1;p=openldap Revert "ITS#8752 ppolicy: don't call same cleanup twice" This reverts commit 1c963f473945e9902c1682d917baa58002a9ab95. Revert "ITS#8752 make sure all cleanups are called in overlay_op_walk" This reverts commit b0ad788b8aaad7d5e75827dacd4bbba203ae69ff. --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index cc13d77c28..a749fba919 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -716,7 +716,8 @@ int overlay_op_walk( if ( rc == LDAP_UNWILLING_TO_PERFORM ) { slap_callback *sc_next; cleanup: - for ( ; op->o_callback; op->o_callback = sc_next ) { + for ( ; op->o_callback && op->o_callback->sc_response != + over_back_response; op->o_callback = sc_next ) { sc_next = op->o_callback->sc_next; if ( op->o_callback->sc_cleanup ) { op->o_callback->sc_cleanup( op, rs ); diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 187feee886..e13c33a866 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -940,7 +940,6 @@ ppolicy_ctrls_cleanup( Operation *op, SlapReply *rs ) if ( ppb->send_ctrl ) { ctrls_cleanup( op, rs, ppb->oldctrls ); } - op->o_callback->sc_cleanup = NULL; return SLAP_CB_CONTINUE; }