]> git.gsnw.org Git - fping.git/commitdiff
port last fix also to netdata
authorDavid Schweikert <david@schweikert.ch>
Tue, 1 Nov 2016 16:42:35 +0000 (17:42 +0100)
committerDavid Schweikert <david@schweikert.ch>
Tue, 1 Nov 2016 16:42:35 +0000 (17:42 +0100)
ChangeLog
src/fping.c

index 94cded69e5a79d5536f0489d03a4717897a3ac4f..86e1cb4970bcfd710b401e717d99f2e887a09fae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,7 +8,7 @@ UNRELEASED
   * (bugfix)  Fix issue compliling on RHEL/Centos 7 (#95, @jbackman)
   * (bugfix) Lower -i limit to 1 instead of 10
   * (bugfix) Improve interval preciseness of -Q reporting
-  * (bugfix) Fix occasional false positive in interval reporting (#97)
+  * (bugfix) Fix occasional false positive in -Q reporting (#97)
 
 2015-10-21  David Schweikert  <david@schweikert.ch>
   * Version 3.13
index 501e7a9b0efec513f9a2b717825e7387e2b794d2..47c17fef91856596fe9694c7bb485d0dfcf01a3d 100644 (file)
@@ -1323,8 +1323,12 @@ void print_netdata( void )
         }
 
         /* if we just sent the probe and didn't receive a reply, we shouldn't count it */
+        h->discard_next_recv_i=0;
         if( h->waiting && timeval_diff(&current_time, &h->last_send_time) < h->timeout) {
-            if(h->num_sent_i) h->num_sent_i--;
+            if(h->num_sent_i) {
+                h->num_sent_i--;
+                h->discard_next_recv_i=1;
+            }
         }