From: Howard Chu Date: Wed, 19 Aug 2009 08:05:18 +0000 (+0000) Subject: Look for our callback to pop, don't just do it blindly X-Git-Tag: ACLCHECK_0~290 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=99341bb367c367abc517012d9d880d3720917d2f;p=openldap Look for our callback to pop, don't just do it blindly --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index 1be6cfa3e9..ffa0251293 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -699,7 +699,7 @@ over_op_func( slap_overinfo *oi; slap_overinst *on; BackendDB *be = op->o_bd, db; - slap_callback cb = {NULL, over_back_response, NULL, NULL}; + slap_callback cb = {NULL, over_back_response, NULL, NULL}, **sc; int rc = SLAP_CB_CONTINUE; /* FIXME: used to happen for instance during abandon @@ -719,9 +719,14 @@ over_op_func( op->o_callback = &cb; rc = overlay_op_walk( op, rs, which, oi, on ); + for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) { + if ( *sc == &cb ) { + *sc = cb.sc_next; + break; + } + } op->o_bd = be; - op->o_callback = cb.sc_next; return rc; }