]> git.sur5r.net Git - openldap/commitdiff
ITS#3596 - fix overlay cleanup processing
authorHoward Chu <hyc@openldap.org>
Mon, 14 Mar 2005 01:23:38 +0000 (01:23 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 14 Mar 2005 01:23:38 +0000 (01:23 +0000)
servers/slapd/backover.c

index f7e572071ce4f7e143b8cdf2d4f03fbcd39b9810..8532f4b7085f2b746b488319681a1e7433b593d3 100644 (file)
@@ -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;