]> git.sur5r.net Git - openldap/commitdiff
Use #ifdef SLAPD_MONITOR for monitor APIs
authorHoward Chu <hyc@openldap.org>
Tue, 12 Sep 2006 02:59:28 +0000 (02:59 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 12 Sep 2006 02:59:28 +0000 (02:59 +0000)
servers/slapd/back-bdb/init.c
servers/slapd/back-bdb/monitor.c

index 7b85509c7b1a1fae7602e6f8e420f04af44cffab..20826b2045fb070c1f5115349b01b1e7e1b99038 100644 (file)
@@ -81,7 +81,11 @@ bdb_db_init( BackendDB *be )
        be->be_private = bdb;
        be->be_cf_ocs = be->bd_info->bi_cf_ocs;
 
+#ifdef SLAPD_MONITOR
        rc = bdb_monitor_init( be );
+#else
+       rc = 0;
+#endif
 
        return rc;
 }
@@ -425,11 +429,13 @@ bdb_db_open( BackendDB *be )
                XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
        }
 
+#ifdef SLAPD_MONITOR
        /* monitor setup */
        rc = bdb_monitor_open( be );
        if ( rc != 0 ) {
                goto fail;
        }
+#endif
 
        bdb->bi_flags |= BDB_IS_OPEN;
 
@@ -450,8 +456,10 @@ bdb_db_close( BackendDB *be )
        struct bdb_db_info *db;
        bdb_idl_cache_entry_t *entry, *next_entry;
 
+#ifdef SLAPD_MONITOR
        /* monitor handling */
        (void)bdb_monitor_close( be );
+#endif
 
        bdb->bi_flags &= ~BDB_IS_OPEN;
 
@@ -675,6 +683,7 @@ bdb_back_initialize(
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = 0;
 
+#ifdef SLAPD_MONITOR
        /*
         * initialize monitor stuff
         */
@@ -682,6 +691,7 @@ bdb_back_initialize(
        if ( rc ) {
                return rc;
        }
+#endif
 
        rc = bdb_back_init_cf( bi );
 
index b70642e92e362f8e21f70d71f0ff7a22bffcf0da..e5720010a8c44343698ed509ff4db795d030b20f 100644 (file)
@@ -16,6 +16,8 @@
 
 #include "portable.h"
 
+#ifdef SLAPD_MONITOR
+
 #include <stdio.h>
 #include <ac/string.h>
 #include <ac/unistd.h>
@@ -551,3 +553,4 @@ bdb_monitor_destroy( BackendDB *be )
        return 0;
 }
 
+#endif /* SLAPD_MONITOR */