Skip to content

Commit

Permalink
Merge pull request #1774 from davidBar-On/issue-1770-no-limit-to-omit…
Browse files Browse the repository at this point in the history
…-time

No limit to omit time period
  • Loading branch information
bmah888 authored Nov 22, 2024
2 parents 2575ae8 + e03c2cc commit abe95a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/iperf.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ struct iperf_test
#define MIN_INTERVAL 0.1
#define MAX_INTERVAL 60.0
#define MAX_TIME 86400
#define MAX_OMIT_TIME 600
#define MAX_BURST 1000
#define MAX_MSS (9 * 1024)
#define MAX_STREAMS 128
Expand Down
2 changes: 1 addition & 1 deletion src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
break;
case 'O':
test->omit = atoi(optarg);
if (test->omit < 0 || test->omit > 60) {
if (test->omit < 0 || test->omit > MAX_OMIT_TIME) {
i_errno = IEOMIT;
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/iperf_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ iperf_strerror(int int_errno)
snprintf(errstr, len, "this OS does not support sendfile");
break;
case IEOMIT:
snprintf(errstr, len, "bogus value for --omit");
snprintf(errstr, len, "bogus value for --omit (maximum = %d seconds)", MAX_OMIT_TIME);
break;
case IEUNIMP:
snprintf(errstr, len, "an option you are trying to set is not implemented yet");
Expand Down

0 comments on commit abe95a9

Please sign in to comment.