]> git.sur5r.net Git - openldap/commitdiff
ITS#6405 in ldap_pvt_gettime, also check for microsecs going backward
authorHoward Chu <hyc@openldap.org>
Mon, 30 Nov 2009 21:47:38 +0000 (21:47 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 30 Nov 2009 21:47:38 +0000 (21:47 +0000)
libraries/libldap/util-int.c

index 45259665030eabe1a765b865e29d098da03f7546..72fb65db250e17eb078a3697eb7dc8dd87d68948 100644 (file)
@@ -289,7 +289,7 @@ ldap_pvt_gettime( struct lutil_tm *ltm )
        t = tv.tv_sec;
 
        if ( tv.tv_sec < prevTv.tv_sec
-               || ( tv.tv_sec == prevTv.tv_sec && tv.tv_usec == prevTv.tv_usec )) {
+               || ( tv.tv_sec == prevTv.tv_sec && tv.tv_usec <= prevTv.tv_usec )) {
                subs++;
        } else {
                subs = 0;