From d89b0d7604f29ffeae7806a12802da819b440ca2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 1 Mar 2011 00:28:37 +0000 Subject: [PATCH] ITS#6845 set a_flags in attr_alloc() --- servers/slapd/add.c | 3 --- servers/slapd/attr.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) 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; } -- 2.39.5