#include "portable.h"
#include <stdio.h>
+#include "lutil.h"
#include "slap.h"
#include "back-monitor.h"
assert( mi );
assert( e );
- if ( strncasecmp( e->e_ndn, "CN=TOTAL",
- sizeof("CN=TOTAL")-1 ) == 0 ) {
+ if ( strncasecmp( e->e_ndn, "cn=total",
+ sizeof("cn=total")-1 ) == 0 ) {
n = connections_nextid();
- } else if ( strncasecmp( e->e_ndn, "CN=CURRENT",
- sizeof("CN=CURRENT")-1 ) == 0 ) {
+ } else if ( strncasecmp( e->e_ndn, "cn=current",
+ sizeof("cn=current")-1 ) == 0 ) {
Connection *c;
int connindex;
{
struct monitorentrypriv *mp;
struct tm *ltm;
- char buf[1024];
- char buf2[22];
- char buf3[22];
+ char buf[ 1024 ];
+ char buf2[ LDAP_LUTIL_GENTIME_BUFSIZE ];
+ char buf3[ LDAP_LUTIL_GENTIME_BUFSIZE ];
struct berval bv[2];
ldap_pvt_thread_mutex_lock( &gmtime_mutex );
ltm = gmtime( &c->c_starttime );
- strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
+ lutil_gentime( buf2, sizeof( buf2 ), ltm );
ltm = gmtime( &c->c_activitytime );
- strftime( buf3, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
+ lutil_gentime( buf3, sizeof( buf3 ), ltm );
ldap_pvt_thread_mutex_unlock( &gmtime_mutex );