summaryrefslogtreecommitdiff
path: root/src/tools/cbr
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-05-25 10:20:38 +0200
committerdimitri staessens <[email protected]>2016-05-25 10:20:38 +0200
commitbfe91f5a07bf8ad0e0da0fd8079411b3a66e4a79 (patch)
tree5683238d604d983afe850f7b920078802f395ced /src/tools/cbr
parent6810422ff51834779b384dc0b0c56871b35b1392 (diff)
downloadouroboros-bfe91f5a07bf8ad0e0da0fd8079411b3a66e4a79.tar.gz
ouroboros-bfe91f5a07bf8ad0e0da0fd8079411b3a66e4a79.zip
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.
Diffstat (limited to 'src/tools/cbr')
-rw-r--r--src/tools/cbr/cbr_client.c4
1 files changed, 2 insertions, 2 deletions
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);