Skip to content

Commit

Permalink
Get rid of warning "timeout (-t) value larger than period (-p) produc…
Browse files Browse the repository at this point in the history
…es unexpected results", fixes #142
  • Loading branch information
schweikert committed Feb 19, 2019
1 parent 633ea98 commit a4522f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ fping 4.2 (UNRELEASED)
embedded-distro use cases, and not meant to be used generally in place of
compiling IPv6-only binary or using '-6', see also the notes in #139, thanks
abelbeck)
- Get rid of warning "timeout (-t) value larger than period (-p) produces unexpected results"
(#142, thanks @MrDragon1122)


fping 4.1 (2018-09-17)
======================
Expand Down
8 changes: 1 addition & 7 deletions ci/test-09-option-r-t.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w

use Test::Command tests => 23;
use Test::Command tests => 21;
use Test::More;

# -R random bytes
Expand Down Expand Up @@ -104,9 +104,3 @@
}

# (note: fping -t also tested in test-4-options-a-b.pl)

{
my $cmd = Test::Command->new(cmd => "fping -c 2 -p 100 -t 200 127.0.0.1");
$cmd->exit_is_num(0);
$cmd->stderr_like(qr{^fping: warning: timeout \(-t\) value larger than period \(-p\) produces unexpected results\n.*});
}
5 changes: 0 additions & 5 deletions src/fping.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,11 +785,6 @@ int main(int argc, char** argv)
timeout = AUTOTUNE_TIMEOUT_MAX * 100;
}
}
else {
if (timeout > perhost_interval && (loop_flag || (count_flag && count > 1))) {
fprintf(stderr, "%s: warning: timeout (-t) value larger than period (-p) produces unexpected results\n", prog);
}
}
}

#if defined(DEBUG) || defined(_DEBUG)
Expand Down

0 comments on commit a4522f1

Please sign in to comment.