From 2a29233c725d450c1d188f9e5bd7e591f1e0f460 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 11 Jun 2003 02:45:50 +0000 Subject: [PATCH] Fix response callbacks --- servers/slapd/backover.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index ceeb6011af..61f8acbe35 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -129,6 +129,7 @@ over_back_response ( Operation *op, SlapReply *rs ) slap_overinst *on = oi->oi_list; int rc = 0; BackendDB *be = op->o_bd, db = *op->o_bd; + slap_callback *sc = op->o_callback->sc_private; op->o_bd = &db; for (; on; on=on->on_next ) { @@ -138,6 +139,10 @@ over_back_response ( Operation *op, SlapReply *rs ) if ( rc ) break; } } + op->o_callback = sc; + if ( rc == 0 && sc ) { + rc = sc->sc_response( op, rs ); + } op->o_bd = be; return rc; } @@ -155,12 +160,15 @@ over_op_func( { slap_overinfo *oi = (slap_overinfo *) op->o_bd->bd_info; slap_overinst *on = oi->oi_list; - int rc = 0; - BackendDB *be = op->o_bd, db = *op->o_bd; BI_op_bind **func; + BackendDB *be = op->o_bd, db = *op->o_bd; slap_callback cb = {over_back_response, NULL}; + int rc = 0; op->o_bd = &db; + cb.sc_private = op->o_callback; + op->o_callback = &cb; + for (; on; on=on->on_next ) { func = &on->on_bi.bi_op_bind; if ( func[which] ) { @@ -169,6 +177,7 @@ over_op_func( if ( rc ) break; } } + func = &oi->oi_bi.bi_op_bind; if ( func[which] ) { rc = func[which]( op, rs ); -- 2.39.5