mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 01:59:38 -05:00
Don't let timestamps go backward
This commit is contained in:
parent
9467269cef
commit
7ac06970e6
1 changed files with 5 additions and 1 deletions
|
|
@ -60,10 +60,14 @@ lutil_csnstr(char *buf, size_t len, unsigned int replica, unsigned int mod)
|
|||
|
||||
lutil_gettime( &tm );
|
||||
|
||||
if ( tm.tm_usec != prev_usec || tm.tm_sec != prev_sec ) {
|
||||
if ( tm.tm_sec > prev_sec || ( tm.tm_sec == prev_sec &&
|
||||
tm.tm_usec > prev_usec )) {
|
||||
prev_sec = tm.tm_sec;
|
||||
prev_usec = tm.tm_usec;
|
||||
csnop = 0;
|
||||
} else {
|
||||
tm.tm_sec = prev_sec;
|
||||
tm.tm_usec = prev_usec;
|
||||
}
|
||||
op = csnop++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue