]> git.sur5r.net Git - openldap/blob - servers/slapd/back-monitor/operational.c
Changed search attrs from struct berval ** to AttributeName *
[openldap] / servers / slapd / back-monitor / operational.c
1 /* operational.c - monitor backend operational attributes function */
2 /*
3  * Copyright 1998-2001 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6
7 #include "portable.h"
8
9 #include <stdio.h>
10
11 #include <ac/string.h>
12 #include <ac/socket.h>
13
14 #include "slap.h"
15 #include "back-monitor.h"
16 #include "proto-back-monitor.h"
17
18 /*
19  * sets the supported operational attributes (if required)
20  */
21
22 int
23 monitor_back_operational(
24         BackendDB       *be,
25         Connection      *conn, 
26         Operation       *op,
27         Entry           *e,
28         AttributeName   *attrs,
29         int             opattrs,
30         Attribute       **a )
31 {
32         Attribute       **aa = a;
33
34         assert( e );
35
36         if ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, attrs ) ) {
37                 int                     hs;
38                 struct monitorentrypriv *mp;
39
40                 mp = ( struct monitorentrypriv * )e->e_private;
41
42                 assert( mp );
43
44                 hs = MONITOR_HAS_CHILDREN( mp );
45                 *aa = slap_operational_hasSubordinate( hs );
46                 if ( *aa != NULL ) {
47                         aa = &(*aa)->a_next;
48                 }
49         }
50         
51         return 0;
52 }
53