/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2006 The OpenLDAP Foundation.
+ * Copyright 2000-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "../back-monitor/back-monitor.h"
+#include "config.h"
+
static ObjectClass *oc_olmBDBDatabase;
static AttributeDescription *ad_olmBDBEntryCache,
"DESC 'Number of items in Entry Cache' "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
- "USAGE directoryOperation )",
+ "USAGE dSAOperation )",
&ad_olmBDBEntryCache },
{ "( olmBDBAttributes:2 "
"DESC 'Number of items in EntryInfo Cache' "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
- "USAGE directoryOperation )",
+ "USAGE dSAOperation )",
&ad_olmBDBEntryInfo },
{ "( olmBDBAttributes:3 "
"DESC 'Number of items in IDL Cache' "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
- "USAGE directoryOperation )",
+ "USAGE dSAOperation )",
&ad_olmBDBIDLCache },
{ "( olmBDBAttributes:4 "
"where the database environment resides' "
"SUP monitoredInfo "
"NO-USER-MODIFICATION "
- "USAGE directoryOperation )",
+ "USAGE dSAOperation )",
&ad_olmDbDirectory },
{ NULL }
return SLAP_CB_CONTINUE;
}
+#if 0 /* uncomment if required */
static int
bdb_monitor_modify(
Operation *op,
{
return SLAP_CB_CONTINUE;
}
+#endif
static int
bdb_monitor_free(
Entry *e,
- void *priv )
+ void **priv )
{
struct berval values[ 2 ];
Modification mod = { 0 };
int i, rc;
/* NOTE: if slap_shutdown != 0, priv might have already been freed */
+ *priv = NULL;
/* Remove objectClass */
mod.sm_op = LDAP_MOD_DELETE;
bdb_monitor_initialize( void )
{
int i, code;
+ ConfigArgs c;
+ char *argv[ 3 ];
static int bdb_monitor_initialized = 0;
/* register schema here */
+ argv[ 0 ] = "back-bdb/back-hdb monitor";
+ c.argv = argv;
+ c.argc = 3;
+ c.fname = argv[0];
+
for ( i = 0; s_oid[ i ].name; i++ ) {
- char *argv[ 3 ];
-
- argv[ 0 ] = "back-bdb/back-hdb monitor";
+ c.lineno = i;
argv[ 1 ] = s_oid[ i ].name;
argv[ 2 ] = s_oid[ i ].oid;
- if ( parse_oidm( argv[ 0 ], i, 3, argv, 0, NULL ) != 0 ) {
+ if ( parse_oidm( &c, 0, NULL ) != 0 ) {
Debug( LDAP_DEBUG_ANY,
"bdb_monitor_initialize: unable to add "
"objectIdentifier \"%s=%s\"\n",