]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fixup spinning release-1.4.0
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 23 Nov 2009 12:12:59 +0000 (12:12 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 23 Nov 2009 12:12:59 +0000 (12:12 +0000)
git-svn-id: file:///svn/unbound/trunk@1919 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
daemon/stats.c
doc/Changelog
services/mesh.c
testcode/fake_event.c

index 8f00a544020efd6ffb6dc75707ad9ce0f0d0397c..3c0cb2e677021f87bae1f8598a320bf2072caaf4 100644 (file)
@@ -106,9 +106,9 @@ timeval_subtract(struct timeval* d, const struct timeval* end,
        const struct timeval* start)
 {
 #ifndef S_SPLINT_S
-       time_t end_usec = end->tv_usec;;
+       time_t end_usec = end->tv_usec;
        d->tv_sec = end->tv_sec - start->tv_sec;
-       while(end_usec < start->tv_usec) {
+       if(end_usec < start->tv_usec) {
                end_usec += 1000000;
                d->tv_sec--;
        }
index 8dfc08ac22e70afaca1186ccea7c530f2109e37e..2e0ebcd8826e2235d07bcc6708173ec59d72af24 100644 (file)
@@ -58,7 +58,7 @@ timeval_add(struct timeval* d, const struct timeval* add)
 #ifndef S_SPLINT_S
        d->tv_sec += add->tv_sec;
        d->tv_usec += add->tv_usec;
-       while(d->tv_usec > 1000000 ) {
+       if(d->tv_usec > 1000000) {
                d->tv_usec -= 1000000;
                d->tv_sec++;
        }
index 506f2c985ee064847476dc589ccea6995f262c03..0935b2148ba6b04a348d69e08e11d4bcbbbab08f 100644 (file)
@@ -1,5 +1,7 @@
 23 November 2009: Wouter
        - Patch from David Hubbard for libunbound manual page.
+       - Fixup endless spinning in unbound-control stats reported by
+         Attila Nagy.  Probably caused by clock reversal.
 
 20 November 2009: Wouter
        - contrib/split-itar.sh contributed by Tom Hendrikx.
index cc199d0da07b8522c4c5d1427c856a713891fcb9..2169b42362107328232218d36c782bff8f1ee12c 100644 (file)
@@ -61,9 +61,9 @@ static void
 timeval_subtract(struct timeval* d, const struct timeval* end, const struct timeval* start)
 {
 #ifndef S_SPLINT_S
-       time_t end_usec = end->tv_usec;;
+       time_t end_usec = end->tv_usec;
        d->tv_sec = end->tv_sec - start->tv_sec;
-       while(end_usec < start->tv_usec) {
+       if(end_usec < start->tv_usec) {
                end_usec += 1000000;
                d->tv_sec--;
        }
@@ -78,7 +78,7 @@ timeval_add(struct timeval* d, const struct timeval* add)
 #ifndef S_SPLINT_S
        d->tv_sec += add->tv_sec;
        d->tv_usec += add->tv_usec;
-       while(d->tv_usec > 1000000 ) {
+       if(d->tv_usec > 1000000 ) {
                d->tv_usec -= 1000000;
                d->tv_sec++;
        }
index ef44ab7ba3faceba3cef3e08db965be8d3d6a159..29135c4100e0ca89f573da93973790bf0699f9b2 100644 (file)
@@ -71,7 +71,7 @@ timeval_add(struct timeval* d, const struct timeval* add)
 #ifndef S_SPLINT_S
        d->tv_sec += add->tv_sec;
        d->tv_usec += add->tv_usec;
-       while(d->tv_usec > 1000000 ) {
+       if(d->tv_usec > 1000000) {
                d->tv_usec -= 1000000;
                d->tv_sec++;
        }