]> git.sur5r.net Git - openldap/commitdiff
More for prev commit
authorHoward Chu <hyc@openldap.org>
Fri, 27 Feb 2009 01:28:22 +0000 (01:28 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 27 Feb 2009 01:28:22 +0000 (01:28 +0000)
servers/slapd/back-ldap/search.c
servers/slapd/back-meta/search.c

index 8f49187c5041488477c9382b0daa915685cc75e8..2539706e194b6cf9a74c14df5fde7bfc09b5571f 100644 (file)
@@ -819,8 +819,10 @@ ldap_build_entry(
                if ( attr->a_desc->ad_type->sat_flags & SLAP_AT_SORTED_VAL ) {
                        while ( attr->a_numvals > 1 ) {
                                int rc = slap_sort_vals( (Modifications *)attr, &text, &i, op->o_tmpmemctx );
-                               if ( rc != LDAP_TYPE_OR_VALUE_EXISTS )
+                               if ( rc != LDAP_TYPE_OR_VALUE_EXISTS ) {
+                                       attr->a_flags |= SLAP_ATTR_SORTED_VALS;
                                        break;
+                               }
 
                                /* Strip duplicate values */
                                if ( attr->a_nvals != attr->a_vals )
index 8927ef2697e47674fda05203a9810498157936e8..180cd7788e5c2b7ec5bde77b82097dd521d4a3fe 100644 (file)
@@ -2168,8 +2168,10 @@ 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 )
+                                       if ( rc != LDAP_TYPE_OR_VALUE_EXISTS ) {
+                                               attr->a_flags |= SLAP_ATTR_SORTED_VALS;
                                                break;
+                                       }
 
                                        /* Strip duplicate values */
                                        if ( attr->a_nvals != attr->a_vals )