/* operational.c - ldbm backend operational attributes function */
/*
- * Copyright 1998-2001 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
Connection *conn,
Operation *op,
Entry *e,
- char **attrs,
+ AttributeName *attrs,
int opattrs,
Attribute **a )
{
int hs;
hs = has_children( be, e );
-
- *aa = ch_malloc( sizeof( Attribute ) );
- (*aa)->a_desc = slap_schema.si_ad_hasSubordinates;
-
- (*aa)->a_vals = ch_malloc( 2 * sizeof( struct berval * ) );
- (*aa)->a_vals[0] = ber_bvstrdup( hs ? "TRUE" : "FALSE" );
- (*aa)->a_vals[1] = NULL;
-
- (*aa)->a_next = NULL;
- aa = &(*aa)->a_next;
+ *aa = slap_operational_hasSubordinate( hs );
+ if ( *aa != NULL ) {
+ aa = &(*aa)->a_next;
+ }
}
return 0;