From: Howard Chu Date: Tue, 12 Sep 2006 02:59:28 +0000 (+0000) Subject: Use #ifdef SLAPD_MONITOR for monitor APIs X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~166 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7cd64d384bbb997ebfa212a9c8ebc6f042dde631;p=openldap Use #ifdef SLAPD_MONITOR for monitor APIs --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 7b85509c7b..20826b2045 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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 ); diff --git a/servers/slapd/back-bdb/monitor.c b/servers/slapd/back-bdb/monitor.c index b70642e92e..e5720010a8 100644 --- a/servers/slapd/back-bdb/monitor.c +++ b/servers/slapd/back-bdb/monitor.c @@ -16,6 +16,8 @@ #include "portable.h" +#ifdef SLAPD_MONITOR + #include #include #include @@ -551,3 +553,4 @@ bdb_monitor_destroy( BackendDB *be ) return 0; } +#endif /* SLAPD_MONITOR */