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;
/* Any initialization needed? */
if ( on->on_bi.bi_db_init ) {
+ int rc;
be->bd_info = (BackendInfo *)on2;
- on2->on_bi.bi_db_init( be );
+ rc = on2->on_bi.bi_db_init( be );
be->bd_info = (BackendInfo *)oi;
+ if ( rc ) return rc;
}
return 0;