vals[1] = NULL;
e = (Entry *) ch_calloc( 1, sizeof(Entry) );
+ /* initialize reader/writer lock */
+ entry_rdwr_init(e);
e->e_attrs = NULL;
e->e_dn = strdup( SLAPD_MONITOR_DN );
nreadwaiters++;
}
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( &c[i].c_starttime );
-#ifdef LDAP_Y2K
+#ifndef LDAP_LOCALTIME
+ ltm = gmtime( &c[i].c_starttime );
strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
#else
+ ltm = localtime( &c[i].c_starttime );
strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm );
#endif
pthread_mutex_unlock( ¤ttime_mutex );
attr_merge( e, "bytessent", vals );
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( ¤ttime );
-#ifdef LDAP_Y2K
+#ifndef LDAP_LOCALTIME
+ ltm = gmtime( ¤ttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
#else
+ ltm = localtime( ¤ttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif
pthread_mutex_unlock( ¤ttime_mutex );
attr_merge( e, "currenttime", vals );
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( &starttime );
-#ifdef LDAP_Y2K
+#ifndef LDAP_LOCALTIME
+ ltm = gmtime( &starttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
#else
+ ltm = localtime( &starttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif
pthread_mutex_unlock( ¤ttime_mutex );