summaryrefslogtreecommitdiff
path: root/src/lib/flow.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-04-19 11:15:51 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-04-19 11:15:51 +0200
commitc0b2bb854f42ed5975a5c08465fd0012c9e5ce8c (patch)
tree877236ec9d67fbb2182a2f591ab4fb1e9357fa01 /src/lib/flow.c
parentd8e9019fcb56a49c6730bbe7d47e5e1cec682a2d (diff)
parent50cebfe6dbc6dd6740fc2e29b3c543d121bc1a18 (diff)
downloadouroboros-c0b2bb854f42ed5975a5c08465fd0012c9e5ce8c.tar.gz
ouroboros-c0b2bb854f42ed5975a5c08465fd0012c9e5ce8c.zip
Merged in dstaesse/ouroboros/ipcpd-udp (pull request #57)
ipcpd: initial IPC processes
Diffstat (limited to 'src/lib/flow.c')
-rw-r--r--src/lib/flow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/flow.c b/src/lib/flow.c
index 593bef1a..da0ca148 100644
--- a/src/lib/flow.c
+++ b/src/lib/flow.c
@@ -35,9 +35,11 @@ flow_t * flow_create(int32_t port_id)
return NULL;
}
+ INIT_LIST_HEAD(&flow->list);
+
flow->port_id = port_id;
flow->oflags = FLOW_O_DEFAULT;
- flow->state = FLOW_INIT;
+ flow->state = FLOW_NULL;
pthread_mutex_init(&flow->lock, NULL);
@@ -46,6 +48,8 @@ flow_t * flow_create(int32_t port_id)
void flow_destroy(flow_t * flow)
{
+ if (flow == NULL)
+ return;
free(flow);
}