]> 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)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 4 Nov 2011 23:12:10 +0000 (16:12 -0700)
libraries/libldap/util-int.c

index d2b4ae8aee50244125f157921e02435e28471168..f0b5f72f04fe7950c8f7da7383b60aff8cdeaa0d 100644 (file)
@@ -271,7 +271,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;