mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Better fix for prev
This commit is contained in:
parent
6345812f49
commit
7549abb063
@ -819,10 +819,8 @@ 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 ) {
|
||||
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 )
|
||||
@ -838,6 +836,7 @@ ldap_build_entry(
|
||||
if ( attr->a_nvals != attr->a_vals )
|
||||
BER_BVZERO(&attr->a_vals[attr->a_numvals]);
|
||||
}
|
||||
attr->a_flags |= SLAP_ATTR_SORTED_VALS;
|
||||
}
|
||||
|
||||
*attrp = attr;
|
||||
|
@ -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 )
|
||||
@ -2187,6 +2185,7 @@ next_attr:;
|
||||
if ( attr->a_nvals != attr->a_vals )
|
||||
BER_BVZERO(&attr->a_vals[attr->a_numvals]);
|
||||
}
|
||||
attr->a_flags |= SLAP_ATTR_SORTED_VALS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user