do not add hasSubordinates if already present (blind-fixes ITS#6712 for back-ndb)

This commit is contained in:
Pierangelo Masarati 2010-11-18 11:46:18 +00:00
parent 40831ba54f
commit 41858b7047

View File

@ -827,10 +827,15 @@ ndb_operational(
assert( rs->sr_entry != NULL );
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
/* just count */ ;
if ( (*ap)->a_desc == slap_schema.si_ad_hasSubordinates ) {
break;
}
}
if ( SLAP_OPATTRS( rs->sr_attr_flags ) ||
ad_inlist( slap_schema.si_ad_hasSubordinates, rs->sr_attrs ) )
if ( *ap == NULL &&
attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_hasSubordinates ) == NULL &&
( SLAP_OPATTRS( rs->sr_attr_flags ) ||
ad_inlist( slap_schema.si_ad_hasSubordinates, rs->sr_attrs ) ) )
{
int hasSubordinates, rc;