Fixed insertion of the overlay_remove callback (SLAP_CONFIG_DELETE)

This commit is contained in:
Ralf Haferkamp 2012-11-19 14:32:50 +01:00
parent f86e0cd8dc
commit 7c97c036c8

View file

@ -1214,8 +1214,12 @@ overlay_remove( BackendDB *be, slap_overinst *on, Operation *op )
rm_cb->sc_private = (void*) rm_ctx;
/* Append callback to the end of the list */
for ( cb = op->o_callback; cb->sc_next; cb = cb->sc_next );
cb->sc_next = rm_cb;
if ( !op->o_callback ) {
op->o_callback = rm_cb;
} else {
for ( cb = op->o_callback; cb->sc_next; cb = cb->sc_next );
cb->sc_next = rm_cb;
}
}
#endif /* SLAP_CONFIG_DELETE */