Make the retransmits code compile again on systems without retransmits.
Этот коммит содержится в:
родитель
46baab59e8
Коммит
d7ebadafa4
@ -29,7 +29,9 @@ struct iperf_interval_results
|
||||
struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux and FreeBSD */
|
||||
int this_retrans;
|
||||
#else
|
||||
char *tcpInfo; /* just a placeholder */
|
||||
/* Just placeholders, never accessed. */
|
||||
char *tcpInfo;
|
||||
int this_retrans;
|
||||
#endif
|
||||
TAILQ_ENTRY(iperf_interval_results) irlistentries;
|
||||
void *custom_data;
|
||||
|
@ -1273,13 +1273,15 @@ iperf_stats_callback(struct iperf_test * test)
|
||||
temp.interval_duration = timeval_diff(&temp.interval_start_time, &temp.interval_end_time);
|
||||
//temp.interval_duration = timeval_diff(&temp.interval_start_time, &temp.interval_end_time);
|
||||
if (test->protocol->id == Ptcp && has_tcpinfo()) {
|
||||
irp = TAILQ_LAST(&rp->interval_results, irlisthead);
|
||||
if (irp == NULL)
|
||||
prev_total_retransmits = 0;
|
||||
else
|
||||
prev_total_retransmits = get_tcpinfo_total_retransmits(irp);
|
||||
save_tcpinfo(sp, &temp);
|
||||
temp.this_retrans = get_tcpinfo_total_retransmits(&temp) - prev_total_retransmits;
|
||||
if (has_tcpinfo_retransmits()) {
|
||||
irp = TAILQ_LAST(&rp->interval_results, irlisthead);
|
||||
if (irp == NULL)
|
||||
prev_total_retransmits = 0;
|
||||
else
|
||||
prev_total_retransmits = get_tcpinfo_total_retransmits(irp);
|
||||
temp.this_retrans = get_tcpinfo_total_retransmits(&temp) - prev_total_retransmits;
|
||||
}
|
||||
}
|
||||
add_to_interval_list(rp, &temp);
|
||||
rp->bytes_sent_this_interval = rp->bytes_received_this_interval = 0;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user