From f8c14e0246a6c9cb5e8ff47869b5968abb63f010 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Mon, 12 Dec 2016 13:24:17 +0100 Subject: src, tools: Set/get timeout and get qos for flows Receiver timeouts can now be set on a flow using the flow_set_timeout function. Specifying NULL disables the timeout. The flow_get_timeout function gets the value for the timeout. This commit also deprecates fcntl in favor of flow_get_flags and flow_set_flags functions. struct qos_spec is typedef'd as a qosspec_t. The tools and cdap.c are updated to use the new API. Fixes a bug in operf client where the client's writer thread wouldn't cancel on SIGINT. --- src/tools/cbr/cbr_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/cbr/cbr_server.c') diff --git a/src/tools/cbr/cbr_server.c b/src/tools/cbr/cbr_server.c index 104c5e9e..64055cfb 100644 --- a/src/tools/cbr/cbr_server.c +++ b/src/tools/cbr/cbr_server.c @@ -85,7 +85,7 @@ static void handle_flow(int fd) alive = iv_start; ts_add(&iv_start, &intv, &iv_end); - flow_cntl(fd, FLOW_F_SETFL, FLOW_O_NONBLOCK); + flow_set_flags(fd, FLOW_O_NONBLOCK); while (!stop) { clock_gettime(CLOCK_REALTIME, &now); @@ -157,7 +157,7 @@ static void * listener(void * o) { int client_fd = 0; int response = 0; - struct qos_spec qs; + qosspec_t qs; (void) o; -- cgit v1.2.3