From: Hallvard Furuseth Date: Wed, 20 May 2009 21:34:40 +0000 (+0000) Subject: ITS#5328: Make relay_back_has_subordinates() return failure on failure X-Git-Tag: ACLCHECK_0~550 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7f28d0a13d5c0b501ee7073f2f7fd8bcfaf27f8b;p=openldap ITS#5328: Make relay_back_has_subordinates() return failure on failure --- diff --git a/servers/slapd/back-relay/op.c b/servers/slapd/back-relay/op.c index 4c28483d92..11d20beef7 100644 --- a/servers/slapd/back-relay/op.c +++ b/servers/slapd/back-relay/op.c @@ -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