From 9d4819746101fc49755e8b577ed737075621312a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 18 Mar 2004 19:45:34 +0000 Subject: [PATCH] to be conservative ... --- servers/slapd/back-relay/op.c | 52 ++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/servers/slapd/back-relay/op.c b/servers/slapd/back-relay/op.c index d2137d339c..313c2729b7 100644 --- a/servers/slapd/back-relay/op.c +++ b/servers/slapd/back-relay/op.c @@ -113,7 +113,9 @@ relay_back_op_bind( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_bind )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -146,7 +148,9 @@ relay_back_op_unbind( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_unbind )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } return 0; @@ -174,7 +178,9 @@ relay_back_op_search( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_search )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -207,7 +213,9 @@ relay_back_op_compare( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_compare )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -240,7 +248,9 @@ relay_back_op_modify( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_modify )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -273,7 +283,9 @@ relay_back_op_modrdn( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_modrdn )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -306,7 +318,9 @@ relay_back_op_add( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_add )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -339,7 +353,9 @@ relay_back_op_delete( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_delete )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } return rc; @@ -367,7 +383,9 @@ relay_back_op_abandon( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_abandon )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -400,7 +418,9 @@ relay_back_op_cancel( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_cancel )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -433,7 +453,9 @@ relay_back_op_extended( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_extended )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, @@ -521,7 +543,9 @@ relay_back_chk_referrals( struct slap_op *op, struct slap_rep *rs ) rc = ( bd->be_chk_referrals )( op, rs ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } return rc; @@ -554,7 +578,9 @@ relay_back_operational( struct slap_op *op, struct slap_rep *rs, rc = ( bd->be_operational )( op, rs, opattrs, ap ); op->o_bd = be; - op->o_callback = op->o_callback->sc_next; + if ( op->o_callback == &cb ) { + op->o_callback = op->o_callback->sc_next; + } } return rc; -- 2.39.5