summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-05-10 11:32:59 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-05-10 11:32:59 +0200
commit440b4d33d71b19d0057e50ac61fa0b3127738479 (patch)
tree42bb8a3c784a128115b0a3a1e662c101fe30e5c6 /src/lib/dev.c
parentf3b9cc299d729f21d34ed5a7c6b8d06f7b50020e (diff)
downloadouroboros-440b4d33d71b19d0057e50ac61fa0b3127738479.tar.gz
ouroboros-440b4d33d71b19d0057e50ac61fa0b3127738479.zip
irmd: introduced locking
This commit adds locking to the IRMd with a single global lock. It also fixes some issues in cleaning up the daemon.
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r--src/lib/dev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index d574363b..c1cfe043 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -64,6 +64,7 @@ struct ap_data {
int ap_init(char * ap_name)
{
+ int i = 0;
_ap_instance = malloc(sizeof(struct ap_data));
if (_ap_instance == NULL) {
return -1;
@@ -106,6 +107,10 @@ int ap_init(char * ap_name)
return -1;
}
+ for (i = 0; i < AP_MAX_FLOWS; ++i)
+ _ap_instance->flows[i].rb = NULL;
+
+
return 0;
}