summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/opshared.c
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2007-10-02 19:21:32 +0000
committerNathan Kinder <nkinder@redhat.com>2007-10-02 19:21:32 +0000
commit89bad9becdd0c183c9e5a17bf6338e4b66db16ac (patch)
treefc91193b4b7592b64356e987a094d599999828fc /ldap/servers/slapd/opshared.c
parent25cb11892e6582a11bb81efa850ae220906471d7 (diff)
downloadds-89bad9becdd0c183c9e5a17bf6338e4b66db16ac.tar.gz
ds-89bad9becdd0c183c9e5a17bf6338e4b66db16ac.tar.xz
ds-89bad9becdd0c183c9e5a17bf6338e4b66db16ac.zip
Resolves: 282911
Summary: Don't send result twice when searching against a non-existent suffix.
Diffstat (limited to 'ldap/servers/slapd/opshared.c')
-rw-r--r--ldap/servers/slapd/opshared.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index 8c6f2513..abae06bb 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -210,6 +210,7 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
int iscritical = 0;
char * be_name = NULL;
int index = 0;
+ int sent_result = 0;
be_list[0] = NULL;
referral_list[0] = NULL;
@@ -548,6 +549,8 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
int err;
case 1: /* backend successfully sent result to the client */
rc = SLAPI_FAIL_GENERAL;
+ /* Set a flag here so we don't return another result. */
+ sent_result = 1;
/* fall through */
case -1: /* an error occurred */
@@ -676,9 +679,12 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
else if (flag_no_such_object)
{
/* there was at least 1 backend that was called to process
- * the operation and all backends returned NO SUCH OBJECTS
+ * the operation and all backends returned NO SUCH OBJECTS.
+ * Don't send the result if it's already been handled above.
*/
- slapi_send_ldap_result_from_pb(pb);
+ if (!sent_result) {
+ slapi_send_ldap_result_from_pb(pb);
+ }
}
else
{