From: Ralf Haferkamp Date: Mon, 19 Nov 2012 13:32:50 +0000 (+0100) Subject: Fixed insertion of the overlay_remove callback (SLAP_CONFIG_DELETE) X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7c97c036c896eaccd41e3a26ad98232e8790f704;p=openldap Fixed insertion of the overlay_remove callback (SLAP_CONFIG_DELETE) --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index 320b3385c0..8a7e1ed993 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -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 */