diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-04-19 11:15:51 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-04-19 11:15:51 +0200 |
commit | c0b2bb854f42ed5975a5c08465fd0012c9e5ce8c (patch) | |
tree | 877236ec9d67fbb2182a2f591ab4fb1e9357fa01 /src/lib/flow.c | |
parent | d8e9019fcb56a49c6730bbe7d47e5e1cec682a2d (diff) | |
parent | 50cebfe6dbc6dd6740fc2e29b3c543d121bc1a18 (diff) | |
download | ouroboros-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.c | 6 |
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); } |