Skip to content

Commit cd87599

Browse files
committed
handle errno
1 parent 3adc73d commit cd87599

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/iperf_api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,6 +2269,12 @@ iperf_exchange_parameters(struct iperf_test *test)
22692269
i_errno = IECTRLWRITE;
22702270
return -1;
22712271
}
2272+
2273+
err = htonl(errno);
2274+
if (Nwrite(test->ctrl_sck, (char*) &err, sizeof(err), Ptcp) < 0) {
2275+
i_errno = IECTRLWRITE;
2276+
return -1;
2277+
}
22722278

22732279
return -1;
22742280
}

src/iperf_error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ iperf_strerror(int int_errno)
549549
perr = 1;
550550
break;
551551
case IEMAXSERVERTESTDURATIONEXCEEDED:
552-
snprintf(errstr, len, "client's max duration exceeds the server's maximum permitted duration");
552+
snprintf(errstr, len, "client's requested duration exceeds the server's maximum permitted limit");
553553
break;
554554
default:
555555
snprintf(errstr, len, "int_errno=%d", int_errno);

0 commit comments

Comments
 (0)