]> git.sur5r.net Git - openldap/commitdiff
to be conservative ...
authorPierangelo Masarati <ando@openldap.org>
Thu, 18 Mar 2004 19:45:34 +0000 (19:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 18 Mar 2004 19:45:34 +0000 (19:45 +0000)
servers/slapd/back-relay/op.c

index d2137d339cfcfc73522d01276d5058102ac23e83..313c2729b71cc8b80c1419488123a896baafdae4 100644 (file)
@@ -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;