/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2003-2006 The OpenLDAP Foundation.
+ * Copyright 2003-2008 The OpenLDAP Foundation.
* Portions Copyright 1999-2003 Howard Chu.
* Portions Copyright 2000-2003 Pierangelo Masarati.
* All rights reserved.
#include "lutil.h"
#include "back-ldap.h"
+#include "config.h"
+
static ObjectClass *oc_olmLDAPDatabase;
static AttributeDescription *ad_olmDbURIList;
static int
ldap_back_monitor_free(
Entry *e,
- void *priv )
+ void **priv )
{
- ldapinfo_t *li = (ldapinfo_t *)priv;
+ ldapinfo_t *li = (ldapinfo_t *)(*priv);
+
+ *priv = NULL;
if ( !slapd_shutdown && !BER_BVISNULL( &li->li_monitor_info.lmi_rdn ) ) {
ldap_back_monitor_info_destroy( li );
ldap_back_monitor_initialize( void )
{
int i, code;
- const char *err;
+ ConfigArgs c;
+ char *argv[ 3 ];
static int ldap_back_monitor_initialized = 0;
return -1;
}
+ argv[ 0 ] = "back-ldap 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-ldap monitor";
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,
"ldap_back_monitor_initialize: unable to add "
"objectIdentifier \"%s=%s\"\n",
ldapinfo_t *li = (ldapinfo_t *) be->be_private;
char buf[ BACKMONITOR_BUFSIZE ];
Entry *e = NULL;
- monitor_callback_t *cb;
+ monitor_callback_t *cb = NULL;
struct berval suffix, *filter, *base;
char *ptr;
time_t now;