From b120d92bd635d9d3ebd760fac6a13a33d230a8ee Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 14 Mar 2005 01:23:38 +0000 Subject: [PATCH] ITS#3596 - fix overlay cleanup processing --- servers/slapd/backover.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; -- 2.39.5