diff options
author | Jef Poskanzer <jef@mail.acme.com> | 2013-02-07 13:30:58 -0800 |
---|---|---|
committer | Jef Poskanzer <jef@mail.acme.com> | 2013-02-07 13:30:58 -0800 |
commit | eb0206e686436084af2dcba829c2e63c65a3cc49 (patch) | |
tree | 14dfacd4bffdf8efd2d1691f57807ff816aca43f /src/tcp_info.c | |
parent | bf501899e7f890a9104be0fb6e614ebf9fed10b1 (diff) | |
download | iperf3-eb0206e686436084af2dcba829c2e63c65a3cc49.tar.gz |
Better handling of non-exit errors in JSON.
Also converted one more error to the unified call.
Diffstat (limited to 'src/tcp_info.c')
-rw-r--r-- | src/tcp_info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tcp_info.c b/src/tcp_info.c index ecb2bd8..a063a42 100644 --- a/src/tcp_info.c +++ b/src/tcp_info.c @@ -34,6 +34,7 @@ #include <netinet/tcp.h> #include <string.h> #include <netinet/in.h> +#include <errno.h> #include "iperf.h" #include "iperf_api.h" @@ -79,9 +80,8 @@ save_tcpinfo(struct iperf_stream *sp, struct iperf_interval_results *irp) socklen_t tcp_info_length = sizeof(struct tcp_info); if (getsockopt(sp->socket, IPPROTO_TCP, TCP_INFO, (void *)&irp->tcpInfo, &tcp_info_length) < 0) - perror("getsockopt"); + iperf_err(sp->test, "getsockopt - %s", strerror(errno)); #endif - return; } /*************************************************************/ |