2001-12-22 20:28:02 +08:00
|
|
|
/* operational.c - monitor backend operational attributes function */
|
|
|
|
/*
|
|
|
|
* Copyright 1998-2001 The OpenLDAP Foundation, All Rights Reserved.
|
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "portable.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include <ac/string.h>
|
|
|
|
#include <ac/socket.h>
|
|
|
|
|
|
|
|
#include "slap.h"
|
|
|
|
#include "back-monitor.h"
|
|
|
|
#include "proto-back-monitor.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sets the supported operational attributes (if required)
|
|
|
|
*/
|
|
|
|
|
|
|
|
int
|
|
|
|
monitor_back_operational(
|
|
|
|
BackendDB *be,
|
|
|
|
Connection *conn,
|
|
|
|
Operation *op,
|
|
|
|
Entry *e,
|
2001-12-31 19:35:52 +08:00
|
|
|
AttributeName *attrs,
|
2001-12-22 20:28:02 +08:00
|
|
|
int opattrs,
|
|
|
|
Attribute **a )
|
|
|
|
{
|
|
|
|
Attribute **aa = a;
|
|
|
|
|
|
|
|
assert( e );
|
|
|
|
|
|
|
|
if ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, attrs ) ) {
|
|
|
|
int hs;
|
|
|
|
struct monitorentrypriv *mp;
|
|
|
|
|
|
|
|
mp = ( struct monitorentrypriv * )e->e_private;
|
|
|
|
|
|
|
|
assert( mp );
|
|
|
|
|
|
|
|
hs = MONITOR_HAS_CHILDREN( mp );
|
2001-12-22 22:24:13 +08:00
|
|
|
*aa = slap_operational_hasSubordinate( hs );
|
|
|
|
if ( *aa != NULL ) {
|
|
|
|
aa = &(*aa)->a_next;
|
|
|
|
}
|
2001-12-22 20:28:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|