From: Howard Chu Date: Tue, 1 Mar 2011 00:28:37 +0000 (+0000) Subject: ITS#6845 set a_flags in attr_alloc() X-Git-Tag: MIGRATION_CVS2GIT~45 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d89b0d7604f29ffeae7806a12802da819b440ca2;p=openldap ITS#6845 set a_flags in attr_alloc() --- diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 76bd732123..c69ccefd6c 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -500,9 +500,6 @@ slap_mods2entry( } else { attr->a_nvals = attr->a_vals; } - /* slap_mods_check() gives us sorted results */ - if ( attr->a_desc->ad_type->sat_flags & SLAP_AT_SORTED_VAL ) - attr->a_flags |= SLAP_ATTR_SORTED_VALS; *tail = attr; tail = &attr->a_next; diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index fe2eded94a..51f50758fc 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -88,6 +88,8 @@ attr_alloc( AttributeDescription *ad ) ldap_pvt_thread_mutex_unlock( &attr_mutex ); a->a_desc = ad; + if ( ad && ( ad->ad_type->sat_flags & SLAP_AT_SORTED_VAL )) + a->a_flags |= SLAP_ATTR_SORTED_VALS; return a; }