From 99341bb367c367abc517012d9d880d3720917d2f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 19 Aug 2009 08:05:18 +0000 Subject: [PATCH] Look for our callback to pop, don't just do it blindly --- servers/slapd/backover.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; } -- 2.39.5