Fix double entries with fping -u and unreachable hosts

This commit is contained in:
David Schweikert 2014-06-13 08:07:08 +02:00
parent 8f66bac4ec
commit 3cc482f2d3
3 changed files with 6 additions and 7 deletions

View File

@ -1,3 +1,6 @@
UNRELEASED
* Fix double entries with fping -u and unreachable hosts
2014-05-03 David Schweikert <david@schweikert.ch>
* Version 3.10
* Fix confusing error message with -g and IPv6 addresses (#58, reported by Axel Beckert)

View File

@ -17,7 +17,7 @@ $cmd->stderr_is_eq("");
{
my $cmd = Test::Command->new(cmd => "fping -v");
$cmd->exit_is_num(0);
$cmd->stdout_like(qr{ping: Version 3\.\d+
$cmd->stdout_like(qr{ping: Version 3\.\d+(-rc\d+)?
fping: comments to david\@schweikert\.ch
});
$cmd->stderr_is_eq("");

View File

@ -1440,12 +1440,8 @@ int send_ping( int s, HOST_ENTRY *h )
&& errno != EHOSTDOWN
#endif
) {
if( verbose_flag || unreachable_flag ) {
printf( "%s", h->host );
if( verbose_flag )
printf( " error while sending ping: %s\n", strerror( errno ) );
printf( "\n" );
if( verbose_flag ) {
print_warning( "%s: error while sending ping: %s\n", h->host, strerror( errno ) );
}
if( !loop_flag )