From: Howard Chu Date: Mon, 14 Mar 2005 01:23:38 +0000 (+0000) Subject: ITS#3596 - fix overlay cleanup processing X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~74 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b120d92bd635d9d3ebd760fac6a13a33d230a8ee;p=openldap ITS#3596 - fix overlay cleanup processing --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index f7e572071c..8532f4b708 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -296,6 +296,20 @@ over_op_func( if ( rc == SLAP_CB_CONTINUE ) { rc = op_rc[ which ]; } + + /* The underlying backend didn't handle the request, make sure + * overlay cleanup is processed. + */ + if ( rc == LDAP_UNWILLING_TO_PERFORM ) { + slap_callback *sc_next; + for ( ; op->o_callback && op->o_callback != cb.sc_next; + 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 ); + } + } + } op->o_bd = be; op->o_callback = cb.sc_next; return rc;