]> git.sur5r.net Git - openldap/commitdiff
ITS#5328: Make relay_back_has_subordinates() return failure on failure
authorHallvard Furuseth <hallvard@openldap.org>
Wed, 20 May 2009 21:34:40 +0000 (21:34 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Wed, 20 May 2009 21:34:40 +0000 (21:34 +0000)
servers/slapd/back-relay/op.c

index 4c28483d92a6c711aa6d569730adaf2acf93eb8d..11d20beef7a4d42b63d11c5e0bd69fde72afe23b 100644 (file)
@@ -457,15 +457,14 @@ relay_back_has_subordinates( Operation *op, Entry *e, int *hasSubs )
 {
        SlapReply               rs = { 0 };
        BackendDB               *bd;
-       int                     rc = 1;
+       int                     rc = LDAP_OTHER;
 
-       bd = relay_back_select_backend( op, &rs,
-               ( LDAP_SUCCESS | RB_ERR ) );
+       bd = relay_back_select_backend( op, &rs, LDAP_OTHER );
        /* FIXME: this test only works if there are no overlays, so
         * it is nearly useless; if made stricter, no nested back-relays
         * can be instantiated... too bad. */
        if ( bd == NULL || bd == op->o_bd ) {
-               return 0;
+               return LDAP_OTHER;
        }
 
        if ( bd->be_has_subordinates ) {
@@ -477,7 +476,6 @@ relay_back_has_subordinates( Operation *op, Entry *e, int *hasSubs )
        }
 
        return rc;
-
 }
 
 int