]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/search.c
ITS#6098 issuerUID and subjectUID are primitive, not constructed
[openldap] / servers / slapd / back-meta / search.c
index 180cd7788e5c2b7ec5bde77b82097dd521d4a3fe..171221421df2c7f5271f00914c72b2ea9e971c4c 100644 (file)
@@ -2168,10 +2168,8 @@ next_attr:;
                                while ( attr->a_numvals > 1 ) {
                                        int i;
                                        int rc = slap_sort_vals( (Modifications *)attr, &text, &i, op->o_tmpmemctx );
-                                       if ( rc != LDAP_TYPE_OR_VALUE_EXISTS ) {
-                                               attr->a_flags |= SLAP_ATTR_SORTED_VALS;
+                                       if ( rc != LDAP_TYPE_OR_VALUE_EXISTS )
                                                break;
-                                       }
 
                                        /* Strip duplicate values */
                                        if ( attr->a_nvals != attr->a_vals )
@@ -2185,8 +2183,9 @@ next_attr:;
                                        }
                                        BER_BVZERO(&attr->a_vals[attr->a_numvals]);
                                        if ( attr->a_nvals != attr->a_vals )
-                                               BER_BVZERO(&attr->a_vals[attr->a_numvals]);
+                                               BER_BVZERO(&attr->a_nvals[attr->a_numvals]);
                                }
+                               attr->a_flags |= SLAP_ATTR_SORTED_VALS;
                        }
                }
        }