ITS#8460 fix slap_op_time

broken in 2d5996ac60
Was allowing tv_usec to exceed 999999
This commit is contained in:
Howard Chu 2016-07-28 23:40:57 +01:00
parent 5e6aadd779
commit f6510ec83b

View File

@ -173,11 +173,11 @@ slap_op_time(time_t *t, int *nop)
tv.tv_usec <= last_time.tv_usec ) {
tv.tv_sec = last_time.tv_sec;
tv.tv_usec = last_time.tv_usec + 1;
if (tv.tv_usec >= 1000000) {
tv.tv_usec -= 1000000;
tv.tv_sec++;
last_time.tv_sec = tv.tv_sec;
}
}
if (tv.tv_usec >= 1000000) {
tv.tv_usec -= 1000000;
tv.tv_sec++;
last_time.tv_sec = tv.tv_sec;
}
last_time.tv_usec = tv.tv_usec;
ldap_pvt_thread_mutex_unlock( &slap_op_mutex );