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;
}
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;
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;
bi->bi_connection_init = 0;
bi->bi_connection_destroy = 0;
-#ifdef SLAPD_MONITOR
/*
* initialize monitor stuff
*/
if ( rc ) {
return rc;
}
-#endif
rc = bdb_back_init_cf( bi );
#include "portable.h"
-#ifdef SLAPD_MONITOR
-
#include <stdio.h>
#include <ac/string.h>
#include <ac/unistd.h>
#include <sys/stat.h>
#include "lutil.h"
#include "back-bdb.h"
+
+#ifdef SLAPD_MONITOR
+
#include "../back-monitor/back-monitor.h"
static ObjectClass *oc_olmBDBDatabase;
Entry *e,
void *priv )
{
- struct bdb_info *bdb = (struct bdb_info *) priv;
-
return SLAP_CB_CONTINUE;
}
Entry *e,
void *priv )
{
- struct bdb_info *bdb = (struct bdb_info *) priv;
-
struct berval values[ 2 ];
Modification mod = { 0 };
return SLAP_CB_CONTINUE;
}
+#endif /* SLAPD_MONITOR */
+
/*
* call from within bdb_initialize()
*/
int
bdb_monitor_initialize( void )
{
+#ifdef SLAPD_MONITOR
int i, code;
const char *err;
ldap_memfree( oc );
}
+#endif /* SLAPD_MONITOR */
return 0;
}
int
bdb_monitor_init( BackendDB *be )
{
+#ifdef SLAPD_MONITOR
SLAP_DBFLAGS( be ) |= SLAP_DBFLAG_MONITORING;
+#endif /* SLAPD_MONITOR */
return 0;
}
int
bdb_monitor_open( BackendDB *be )
{
+#ifdef SLAPD_MONITOR
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
Attribute *a, *next;
monitor_callback_t *cb = NULL;
}
return rc;
+#else /* !SLAPD_MONITOR */
+ return 0;
+#endif /* SLAPD_MONITOR */
}
/*
int
bdb_monitor_close( BackendDB *be )
{
+#ifdef SLAPD_MONITOR
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
if ( !BER_BVISNULL( &bdb->bi_monitor.bdm_filter ) ) {
memset( &bdb->bi_monitor, 0, sizeof( bdb->bi_monitor ) );
}
+#endif /* SLAPD_MONITOR */
return 0;
}
{
return 0;
}
-
-#endif /* SLAPD_MONITOR */