static LDAP_STAILQ_HEAD(ATList, slap_attribute_type) attr_list
= LDAP_STAILQ_HEAD_INITIALIZER(attr_list);
+/* Last hardcoded attribute registered */
+AttributeType *at_sys_tail;
+
int at_oc_cache;
static int
/* Mark the attribute as deleted, remove from list, and remove all its
* names from the AVL tree. Leave the OID in the tree.
*/
-int
+void
at_delete( AttributeType *at )
{
at->sat_flags |= SLAP_AT_DELETED;
LDAP_STAILQ_REMOVE(&attr_list,at,slap_attribute_type,sat_next);
at_delete_names( at );
-
- return 0;
}
static void
}
}
+ if ( sat->sat_flags & SLAP_AT_HARDCODE ) {
+ prev = at_sys_tail;
+ at_sys_tail = sat;
+ }
if ( prev ) {
LDAP_STAILQ_INSERT_AFTER( &attr_list, prev, sat, sat_next );
} else {
/* count the result size */
i = 0;
for ( at=start; at; at=LDAP_STAILQ_NEXT(at, sat_next)) {
- if ( sys && !(at->sat_flags & SLAP_AT_HARDCODE)) continue;
+ if ( sys && !(at->sat_flags & SLAP_AT_HARDCODE)) break;
i++;
if ( at == end ) break;
}
i = 0;
for ( at=start; at; at=LDAP_STAILQ_NEXT(at, sat_next)) {
LDAPAttributeType lat, *latp;
- if ( sys && !(at->sat_flags & SLAP_AT_HARDCODE)) continue;
+ if ( sys && !(at->sat_flags & SLAP_AT_HARDCODE)) break;
if ( at->sat_oidmacro ) {
lat = at->sat_atype;
lat.at_oid = at->sat_oidmacro;