summaryrefslogtreecommitdiff
path: root/src/irmd/irm_flow.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-10-20 19:52:02 +0200
committerdimitri staessens <[email protected]>2016-10-21 14:17:51 +0200
commit02976060919566d1a217b818ca8f33297700d56d (patch)
treeb8b6d7a4ff6f3b763891b6285248d6495e267a6a /src/irmd/irm_flow.c
parentf516b51169020ea1957010fbd1005d746f01b1d9 (diff)
downloadouroboros-02976060919566d1a217b818ca8f33297700d56d.tar.gz
ouroboros-02976060919566d1a217b818ca8f33297700d56d.zip
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.
Diffstat (limited to 'src/irmd/irm_flow.c')
-rw-r--r--src/irmd/irm_flow.c6
1 files changed, 6 insertions, 0 deletions
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);
}