From 32ab06bdd1bbe053c19f770ae852cecdd50cde6d Mon Sep 17 00:00:00 2001 From: David Schweikert Date: Tue, 1 Nov 2016 17:42:35 +0100 Subject: [PATCH] port last fix also to netdata --- ChangeLog | 2 +- src/fping.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94cded6..86e1cb4 100644 --- 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 * Version 3.13 diff --git a/src/fping.c b/src/fping.c index 501e7a9..47c17fe 100644 --- a/src/fping.c +++ b/src/fping.c @@ -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(¤t_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; + } }