/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2001-2009 The OpenLDAP Foundation.
+ * Copyright 2001-2011 The OpenLDAP Foundation.
* Portions Copyright 2001-2003 Pierangelo Masarati.
* All rights reserved.
*
OperationBuffer opbuf;
Operation *op;
void *thrctx;
- SlapReply rs = { 0 };
+ SlapReply rs = { REP_RESULT };
slap_callback cb = { NULL, monitor_search2ndn_cb, NULL, NULL };
int rc;
}
thrctx = ldap_pvt_thread_pool_context();
- connection_fake_init( &conn, &opbuf, thrctx );
+ connection_fake_init2( &conn, &opbuf, thrctx, 0 );
op = &opbuf.ob_op;
op->o_tag = LDAP_REQ_SEARCH;
*elpp = (entry_limbo_t *)ch_malloc( sizeof( entry_limbo_t ) );
if ( *elpp == NULL ) {
- el.el_e->e_private = NULL;
- entry_free( el.el_e );
- return -1;
- }
-
- if ( *elpp != NULL ) {
- el.el_next = NULL;
- **elpp = el;
-
- } else {
if ( !BER_BVISNULL( &el.el_filter ) ) {
ch_free( el.el_filter.bv_val );
}
}
return -1;
}
+
+ el.el_next = NULL;
+ **elpp = el;
}
return 0;
bi->bi_extended = 0;
- bi->bi_entry_release_rw = 0;
+ bi->bi_entry_release_rw = monitor_back_release;
bi->bi_chk_referrals = 0;
bi->bi_operational = monitor_back_operational;
bi->bi_tool_entry_open = 0;
bi->bi_tool_entry_close = 0;
bi->bi_tool_entry_first = 0;
+ bi->bi_tool_entry_first_x = 0;
bi->bi_tool_entry_next = 0;
bi->bi_tool_entry_get = 0;
bi->bi_tool_entry_put = 0;
monitor_entry_t *mp;
int i;
struct berval bv, rdn = BER_BVC(SLAPD_MONITOR_DN);
- struct tm *tms;
-#ifdef HAVE_GMTIME_R
- struct tm tm_buf;
-#endif
+ struct tm tms;
static char tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
struct berval desc[] = {
BER_BVC("This subtree contains monitoring/managing objects."),
/*
* Start
*/
-#ifndef HAVE_GMTIME_R
- ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#endif
-#ifdef HACK_LOCAL_TIME
-# ifdef HAVE_LOCALTIME_R
- tms = localtime_r( &starttime, &tm_buf );
-# else
- tms = localtime( &starttime );
-# endif /* HAVE_LOCALTIME_R */
- lutil_localtime( tmbuf, sizeof(tmbuf), tms, -timezone );
-#else /* !HACK_LOCAL_TIME */
-# ifdef HAVE_GMTIME_R
- tms = gmtime_r( &starttime, &tm_buf );
-# else
- tms = gmtime( &starttime );
-# endif /* HAVE_GMTIME_R */
- lutil_gentime( tmbuf, sizeof(tmbuf), tms );
-#endif /* !HACK_LOCAL_TIME */
-#ifndef HAVE_GMTIME_R
- ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
-#endif
+ ldap_pvt_gmtime( &starttime, &tms );
+ lutil_gentime( tmbuf, sizeof(tmbuf), &tms );
mi->mi_startTime.bv_val = tmbuf;
mi->mi_startTime.bv_len = strlen( tmbuf );