if ( sat->sat_extensions ) {
for (i=0; sat->sat_extensions[i]; i++) {
if (!strcasecmp( sat->sat_extensions[i]->lsei_name,
- "X-ORDERED" ) && sat->sat_extensions[i]->lsei_values &&
- !strcasecmp( sat->sat_extensions[i]->lsei_values[0],
- "VALUES" )) {
- sat->sat_flags |= SLAP_AT_ORDERED;
- break;
+ "X-ORDERED" ) && sat->sat_extensions[i]->lsei_values ) {
+ if ( !strcasecmp( sat->sat_extensions[i]->lsei_values[0],
+ "VALUES" )) {
+ sat->sat_flags |= SLAP_AT_ORDERED_VAL;
+ break;
+ } else if ( !strcasecmp( sat->sat_extensions[i]->lsei_values[0],
+ "SIBLINGS" )) {
+ sat->sat_flags |= SLAP_AT_ORDERED_SIB;
+ break;
+ }
}
}
}
vals = ml->sml_values;
}
- if ( a && ( ad->ad_type->sat_flags & SLAP_AT_ORDERED )) {
+ if ( a && ( ad->ad_type->sat_flags & SLAP_AT_ORDERED_VAL )) {
sort = 1;
rc = ordered_value_sort( a, 1 );
if ( rc )
}
/* no - add them */
- if ( mod->sm_desc->ad_type->sat_flags & SLAP_AT_ORDERED ) {
+ if ( mod->sm_desc->ad_type->sat_flags & SLAP_AT_ORDERED_VAL ) {
rc = ordered_value_add( e, mod->sm_desc, a,
pmod.sm_values, pmod.sm_nvalues );
} else {
mod->sm_desc->ad_cname.bv_val );
rc = LDAP_NO_SUCH_ATTRIBUTE;
}
- } else if ( a->a_desc->ad_type->sat_flags & SLAP_AT_ORDERED ) {
+ } else if ( a->a_desc->ad_type->sat_flags & SLAP_AT_ORDERED_VAL ) {
/* For an ordered attribute, renumber the value indices */
ordered_value_sort( a, 1 );
}
#endif
#define SLAP_AT_DYNAMIC 0x0400U /* dynamically generated */
-#define SLAP_AT_ORDERED 0x0001U /* values are ordered */
+#define SLAP_AT_ORDERED_VAL 0x0001U /* values are ordered */
+#define SLAP_AT_ORDERED_SIB 0x0002U /* siblings are ordered */
+#define SLAP_AT_ORDERED 0x0003U /* value has order index */
#define SLAP_AT_HARDCODE 0x10000U /* This is hardcoded schema */
slap_mask_t sat_flags;