Fixed bug where -R mode selected on a closed file.
Also added a debugging routine to dump an fd_set.
Этот коммит содержится в:
родитель
e42991a717
Коммит
a4c1383a77
@ -181,6 +181,7 @@ iperf_handle_message_server(struct iperf_test *test)
|
|||||||
case TEST_START:
|
case TEST_START:
|
||||||
break;
|
break;
|
||||||
case TEST_END:
|
case TEST_END:
|
||||||
|
test->done = 1;
|
||||||
cpu_util(test->cpu_util);
|
cpu_util(test->cpu_util);
|
||||||
test->stats_callback(test);
|
test->stats_callback(test);
|
||||||
SLIST_FOREACH(sp, &test->streams, streams) {
|
SLIST_FOREACH(sp, &test->streams, streams) {
|
||||||
|
@ -279,3 +279,23 @@ iperf_json_printf(const char *format, ...)
|
|||||||
va_end(argp);
|
va_end(argp);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Debugging routine to dump out an fd_set. */
|
||||||
|
void
|
||||||
|
iperf_dump_fdset(FILE *fp, char *str, int nfds, fd_set *fds)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
int comma;
|
||||||
|
|
||||||
|
fprintf(fp, "%s: [", str);
|
||||||
|
comma = 0;
|
||||||
|
for (fd = 0; fd < nfds; ++fd) {
|
||||||
|
if (FD_ISSET(fd, fds)) {
|
||||||
|
if (comma)
|
||||||
|
fprintf(fp, ", ");
|
||||||
|
fprintf(fp, "%d", fd);
|
||||||
|
comma = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(fp, "]\n");
|
||||||
|
}
|
||||||
|
@ -30,4 +30,6 @@ char* get_system_info(void);
|
|||||||
|
|
||||||
cJSON* iperf_json_printf(const char *format, ...);
|
cJSON* iperf_json_printf(const char *format, ...);
|
||||||
|
|
||||||
|
void iperf_dump_fdset(FILE *fp, char *str, int nfds, fd_set *fds);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user