From bfe91f5a07bf8ad0e0da0fd8079411b3a66e4a79 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 25 May 2016 10:20:38 +0200 Subject: tools: cbr continues when a write fails the CBR tool would stop if the buffer is full. Now it will continue sending SDU's until the duration expires. --- src/tools/cbr/cbr_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/cbr/cbr_client.c') diff --git a/src/tools/cbr/cbr_client.c b/src/tools/cbr/cbr_client.c index 330cfa43..78b95255 100644 --- a/src/tools/cbr/cbr_client.c +++ b/src/tools/cbr/cbr_client.c @@ -67,7 +67,7 @@ int client_main(int duration, int size, long rate) if (flow_write(fd, buf, size) == -1) { printf("Failed to write SDU.\n"); - stop = true; + continue; } nanosleep(&interval, NULL); @@ -78,7 +78,7 @@ int client_main(int duration, int size, long rate) if (duration != 0 && ts_diff_us(&start, &end) / MILLION >= (long) duration) - stop = 1; + stop = true; } clock_gettime(CLOCK_REALTIME, &end); -- cgit v1.2.3