]> git.sur5r.net Git - openldap/commitdiff
refine previous commit
authorPierangelo Masarati <ando@openldap.org>
Sat, 6 May 2006 03:16:45 +0000 (03:16 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 6 May 2006 03:16:45 +0000 (03:16 +0000)
servers/slapd/back-meta/search.c

index d2231c4e49c436a235663970e488410349280c29..839f53a6ee5f03a3e8188ebe9c3f2f4a28c0671b 100644 (file)
@@ -470,11 +470,18 @@ meta_back_search( Operation *op, SlapReply *rs )
         */
        for ( i = 0; i < mi->mi_ntargets; i++ ) {
                candidates[ i ].sr_msgid = META_MSGID_IGNORE;
+
+               if ( candidates[ i ].sr_tag != META_CANDIDATE ) {
+                       continue;
+               }
+
                candidates[ i ].sr_matched = NULL;
                candidates[ i ].sr_text = NULL;
                candidates[ i ].sr_ref = NULL;
                candidates[ i ].sr_ctrls = NULL;
+       }
 
+       for ( i = 0; i < mi->mi_ntargets; i++ ) {
                if ( candidates[ i ].sr_tag != META_CANDIDATE
                        || candidates[ i ].sr_err != LDAP_SUCCESS )
                {