]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/operational.c
Simpler fix for NO_THREADS
[openldap] / servers / slapd / back-monitor / operational.c
index 46366905dfc8d8b9769130d10037e024c745010d..0141d17451134cc43899a027db35002cef2d66fe 100644 (file)
@@ -1,6 +1,6 @@
 /* operational.c - monitor 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
  */
 
@@ -25,7 +25,7 @@ monitor_back_operational(
        Connection      *conn, 
        Operation       *op,
        Entry           *e,
-       char            **attrs,
+       AttributeName   *attrs,
        int             opattrs,
        Attribute       **a )
 {
@@ -42,16 +42,10 @@ monitor_back_operational(
                assert( mp );
 
                hs = MONITOR_HAS_CHILDREN( mp );
-
-               *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;