From: Pierangelo Masarati Date: Wed, 6 Sep 2006 02:14:32 +0000 (+0000) Subject: don't get mad if monitor database is not configured X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~207 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c67913ce1c21acf1aa0e810761f3ba7a1ccd2098;p=openldap don't get mad if monitor database is not configured --- diff --git a/servers/slapd/back-bdb/monitor.c b/servers/slapd/back-bdb/monitor.c index 3fd2e333c3..2b61f60934 100644 --- a/servers/slapd/back-bdb/monitor.c +++ b/servers/slapd/back-bdb/monitor.c @@ -258,6 +258,20 @@ bdb_monitor_open( BackendDB *be ) char *ptr; int rc = 0; + /* don't bother if monitor is not configured */ + if ( !monitor_back_is_configured() ) { + static int warning = 0; + + if ( warning++ == 0 ) { + Debug( LDAP_DEBUG_ANY, "bdb_monitor_open: " + "monitoring disabled; " + "configure monitor database to enable\n", + 0, 0, 0 ); + } + + return 0; + } + /* monitor_back_register_entry_attrs() with a NULL ndn, * base="cn=Databases,cn=Monitor", scope=LDAP_SCOPE_ONE * and filter="(namingContexts:distinguishedNameMatch:=)" */