родитель
a8e0787764
Коммит
a071a8c8bd
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* iperf, Copyright (c) 2014-2020, The Regents of the University of
|
||||
* iperf, Copyright (c) 2014-2021, The Regents of the University of
|
||||
* California, through Lawrence Berkeley National Laboratory (subject
|
||||
* to receipt of any required approvals from the U.S. Dept. of
|
||||
* Energy). All rights reserved.
|
||||
@ -60,6 +60,8 @@ typedef uint64_t iperf_size_t;
|
||||
#define DEFAULT_NO_MSG_RCVD_TIMEOUT 120000
|
||||
#define MIN_NO_MSG_RCVD_TIMEOUT 100
|
||||
|
||||
#define WARN_STR_LEN 128
|
||||
|
||||
/* short option equivalents, used to support options that only have long form */
|
||||
#define OPT_SCTP 1
|
||||
#define OPT_LOGFILE 2
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* iperf, Copyright (c) 2014-2020, The Regents of the University of
|
||||
* iperf, Copyright (c) 2014-2021, The Regents of the University of
|
||||
* California, through Lawrence Berkeley National Laboratory (subject
|
||||
* to receipt of any required approvals from the U.S. Dept. of
|
||||
* Energy). All rights reserved.
|
||||
@ -403,9 +403,11 @@ iperf_udp_accept(struct iperf_test *test)
|
||||
*/
|
||||
if (rc > 0) {
|
||||
if (test->settings->socket_bufsize == 0) {
|
||||
char str[WARN_STR_LEN];
|
||||
int bufsize = test->settings->blksize + UDP_BUFFER_EXTRA;
|
||||
printf("Increasing socket buffer size to %d\n",
|
||||
bufsize);
|
||||
snprintf(str, sizeof(str), "Increasing socket buffer size to %d",
|
||||
bufsize);
|
||||
warning(str);
|
||||
test->settings->socket_bufsize = bufsize;
|
||||
rc = iperf_udp_buffercheck(test, s);
|
||||
if (rc < 0)
|
||||
@ -515,9 +517,11 @@ iperf_udp_connect(struct iperf_test *test)
|
||||
*/
|
||||
if (rc > 0) {
|
||||
if (test->settings->socket_bufsize == 0) {
|
||||
char str[WARN_STR_LEN];
|
||||
int bufsize = test->settings->blksize + UDP_BUFFER_EXTRA;
|
||||
printf("Increasing socket buffer size to %d\n",
|
||||
bufsize);
|
||||
snprintf(str, sizeof(str), "Increasing socket buffer size to %d",
|
||||
bufsize);
|
||||
warning(str);
|
||||
test->settings->socket_bufsize = bufsize;
|
||||
rc = iperf_udp_buffercheck(test, s);
|
||||
if (rc < 0)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user