From 7ba0fd0ce19244745c8d2512ce8a003783d914a7 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 30 Mar 2017 20:33:22 +0200 Subject: lib: Revise flow allocation API The flow_alloc_res and flow_alloc_resp calls have been removed. The flow_alloc and flow_accept calls are now both blocking and take an additional timeout argument. --- src/tools/cbr/cbr_client.c | 10 +--------- 1 file changed, 1 insertion(+), 9 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 16ade13d..5ec1d560 100644 --- a/src/tools/cbr/cbr_client.c +++ b/src/tools/cbr/cbr_client.c @@ -63,7 +63,6 @@ int client_main(char * server, struct sigaction sig_act; int fd = 0; - int result = 0; char buf[size]; long seqnr = 0; long gap = size * 8.0 * (BILLION / (double) rate); @@ -90,19 +89,12 @@ int client_main(char * server, printf("Client started, duration %d, rate %lu b/s, size %d B.\n", duration, rate, size); - fd = flow_alloc(server, NULL); + fd = flow_alloc(server, NULL, NULL); if (fd < 0) { printf("Failed to allocate flow.\n"); return -1; } - result = flow_alloc_res(fd); - if (result < 0) { - printf("Flow allocation refused.\n"); - flow_dealloc(fd); - return -1; - } - clock_gettime(CLOCK_REALTIME, &start); if (!flood) { while (!stop) { -- cgit v1.2.3