From 7f28d0a13d5c0b501ee7073f2f7fd8bcfaf27f8b Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 20 May 2009 21:34:40 +0000 Subject: [PATCH] ITS#5328: Make relay_back_has_subordinates() return failure on failure --- servers/slapd/back-relay/op.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.39.5