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/oping/oping_client.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/tools/oping/oping_client.c') diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c index a91a126c..77a08db7 100644 --- a/src/tools/oping/oping_client.c +++ b/src/tools/oping/oping_client.c @@ -176,7 +176,6 @@ static int client_init(void) client.rtt_m2 = 0; pthread_mutex_init(&client.lock, NULL); - pthread_mutex_lock(&client.lock); return 0; } @@ -213,21 +212,13 @@ int client_main(void) return -1; } - fd = flow_alloc(client.s_apn, NULL); + fd = flow_alloc(client.s_apn, NULL, NULL); if (fd < 0) { printf("Failed to allocate flow.\n"); - return -1; - } - - if (flow_alloc_res(fd)) { - printf("Flow allocation refused.\n"); - flow_dealloc(fd); client_fini(); return -1; } - pthread_mutex_unlock(&client.lock); - clock_gettime(CLOCK_REALTIME, &tic); pthread_create(&client.reader_pt, NULL, reader, &fd); -- cgit v1.2.3