]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/sent.c
Add search no-op support.
[openldap] / servers / slapd / back-monitor / sent.c
index f14337b8267aa087bd563d81cfa959117a680243..39926e338d25a2f03b2625681e4e4292f6d245b0 100644 (file)
@@ -1,12 +1,9 @@
 /* sent.c - deal with data sent subsystem */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
- * Copyright 2001 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- * 
  * Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
  * 
  * This work has beed deveolped for the OpenLDAP Foundation 
@@ -58,17 +55,17 @@ monitor_subsys_sent_init(
        mi = ( struct monitorinfo * )be->be_private;
 
        if ( monitor_cache_get( mi,
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn, &e_sent ) ) {
+                       &monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn, &e_sent ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val, 
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 
                        "", "" );
 #endif
                return( -1 );
@@ -81,15 +78,9 @@ monitor_subsys_sent_init(
         */
        snprintf( buf, sizeof( buf ),
                        "dn: cn=Entries,%s\n"
-                       "objectClass: top\n"
-                       "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
-                       "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
-                       "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+                       SLAPD_MONITOR_OBJECTCLASSES
                        "cn: Entries\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -97,12 +88,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Entries,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Entries,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -126,12 +117,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Entries,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Entries,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -144,15 +135,9 @@ monitor_subsys_sent_init(
         */
        snprintf( buf, sizeof( buf ),
                        "dn: cn=Referrals,%s\n"
-                       "objectClass: top\n"
-                       "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
-                       "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
-                       "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+                       SLAPD_MONITOR_OBJECTCLASSES
                        "cn: Referrals\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -160,12 +145,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Referrals,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Referrals,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -188,12 +173,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Referrals,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Referrals,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -206,15 +191,9 @@ monitor_subsys_sent_init(
         */
        snprintf( buf, sizeof( buf ),
                        "dn: cn=PDU,%s\n"
-                       "objectClass: top\n"
-                       "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
-                       "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
-                       "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+                       SLAPD_MONITOR_OBJECTCLASSES
                        "cn: PDU\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -222,12 +201,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=PDU,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=PDU,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -250,12 +229,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=PDU,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=PDU,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -268,15 +247,9 @@ monitor_subsys_sent_init(
         */
        snprintf( buf, sizeof( buf ),
                        "dn: cn=Bytes,%s\n"
-                       "objectClass: top\n"
-                       "objectClass: LDAPsubEntry\n"
-#ifdef SLAPD_MONITORSUBENTRY
-                       "objectClass: monitorSubEntry\n"
-#else /* !SLAPD_MONITORSUBENTRY */
-                       "objectClass: extensibleObject\n"
-#endif /* !SLAPD_MONITORSUBENTRY */
+                       SLAPD_MONITOR_OBJECTCLASSES
                        "cn: Bytes\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -284,12 +257,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Bytes,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Bytes,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -312,12 +285,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Bytes,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Bytes,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val,
                        "", "" );
 #endif
                return( -1 );