| 431 | } |
| 432 | |
| 433 | static int |
| 434 | create_server_omit_timer(struct iperf_test * test) |
| 435 | { |
| 436 | struct iperf_time now; |
| 437 | TimerClientData cd; |
| 438 | |
| 439 | if (test->omit == 0) { |
| 440 | test->omit_timer = NULL; |
| 441 | test->omitting = 0; |
| 442 | } else { |
| 443 | if (iperf_time_now(&now) < 0) { |
| 444 | i_errno = IEINITTEST; |
| 445 | return -1; |
| 446 | } |
| 447 | test->omitting = 1; |
| 448 | cd.p = test; |
| 449 | test->omit_timer = tmr_create(&now, server_omit_timer_proc, cd, test->omit * SEC_TO_US, 0); |
| 450 | if (test->omit_timer == NULL) { |
| 451 | i_errno = IEINITTEST; |
| 452 | return -1; |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | return 0; |
| 457 | } |
| 458 | |
| 459 | static void |
| 460 | cleanup_server(struct iperf_test *test) |
no test coverage detected
searching dependent graphs…