| 270 | } |
| 271 | |
| 272 | static int |
| 273 | create_client_omit_timer(struct iperf_test * test) |
| 274 | { |
| 275 | struct iperf_time now; |
| 276 | TimerClientData cd; |
| 277 | if (NULL == test) |
| 278 | { |
| 279 | iperf_err(NULL, "No test\n"); |
| 280 | return -1; |
| 281 | } |
| 282 | |
| 283 | if (test->omit == 0) { |
| 284 | test->omit_timer = NULL; |
| 285 | test->omitting = 0; |
| 286 | } else { |
| 287 | if (iperf_time_now(&now) < 0) { |
| 288 | i_errno = IEINITTEST; |
| 289 | return -1; |
| 290 | } |
| 291 | test->omitting = 1; |
| 292 | cd.p = test; |
| 293 | test->omit_timer = tmr_create(&now, client_omit_timer_proc, cd, test->omit * SEC_TO_US, 0); |
| 294 | if (test->omit_timer == NULL) { |
| 295 | i_errno = IEINITTEST; |
| 296 | return -1; |
| 297 | } |
| 298 | } |
| 299 | return 0; |
| 300 | } |
| 301 | |
| 302 | int |
| 303 | iperf_handle_message_client(struct iperf_test *test) |
no test coverage detected
searching dependent graphs…