[Fedora-directory-commits] ldapserver/ldap/servers/slapd opshared.c, 1.8, 1.9

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Tue Oct 2 19:21:34 UTC 2007


Author: nkinder

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16047

Modified Files:
	opshared.c 
Log Message:
Resolves: 282911
Summary: Don't send result twice when searching against a non-existent suffix.



Index: opshared.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/opshared.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- opshared.c	10 Nov 2006 23:45:40 -0000	1.8
+++ opshared.c	2 Oct 2007 19:21:32 -0000	1.9
@@ -210,6 +210,7 @@
   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 @@
       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 @@
     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
     {




More information about the Fedora-directory-commits mailing list