From 02976060919566d1a217b818ca8f33297700d56d Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 20 Oct 2016 19:52:02 +0200 Subject: lib: Move rbuff creation/destruction to IRMd This stabilises flow allocation now that the rbuffs are created upon flow allocation. Only the IRMd can sync this process sufficiently. --- src/irmd/irm_flow.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/irmd/irm_flow.c') diff --git a/src/irmd/irm_flow.c b/src/irmd/irm_flow.c index df1302b4..dc5d22d8 100644 --- a/src/irmd/irm_flow.c +++ b/src/irmd/irm_flow.c @@ -36,6 +36,9 @@ struct irm_flow * irm_flow_create() f->n_api = -1; f->n_1_api = -1; f->port_id = -1; + f->n_rb = NULL; + f->n_1_rb = NULL; + f->state = FLOW_NULL; if (pthread_cond_init(&f->state_cond, NULL)) { @@ -78,6 +81,9 @@ void irm_flow_destroy(struct irm_flow * f) pthread_cond_destroy(&f->state_cond); pthread_mutex_destroy(&f->state_lock); + shm_rbuff_destroy(f->n_rb); + shm_rbuff_destroy(f->n_1_rb); + free(f); } -- cgit v1.2.3