From a5828a2795d7db84b9a83ac119b98442d140cb98 Mon Sep 17 00:00:00 2001 From: Thomas Liske Date: Fri, 6 Jul 2012 22:33:20 +0200 Subject: [PATCH] This commit fixes #13 (Debian #308695): don't remove hosts if sendto returns an error. The error might recover and fping should still try to reach the host and count it as packet loss. --- src/fping.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fping.c b/src/fping.c index e0db383..7a628bc 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1586,10 +1586,11 @@ int send_ping( int s, HOST_ENTRY *h ) }/* IF */ - num_unreachable++; - remove_job( h ); + h->num_sent++; + h->num_sent_i++; + num_pingsent++; free( buffer ); - return(0); + return(1); } /* mark this trial as outstanding */ -- 2.43.0