summaryrefslogtreecommitdiff
path: root/src/irmd/registry.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-09 19:51:44 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-09 19:51:44 +0200
commit3eb6acfd135cdfb82d19a4f445776ea2f13fd4e1 (patch)
tree96fe9ca4332c43b620f64f3f7bb4550c52191a97 /src/irmd/registry.c
parentfa719e594be2a6d3132706c11166fd4ad4d57e01 (diff)
parent1c67b4cd199f9efed96468a2a2ee69fd755bcf7c (diff)
downloadouroboros-3eb6acfd135cdfb82d19a4f445776ea2f13fd4e1.tar.gz
ouroboros-3eb6acfd135cdfb82d19a4f445776ea2f13fd4e1.zip
Merged in dstaesse/ouroboros/be-bugfixing (pull request #197)
irmd: Close filedescriptor on exit
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r--src/irmd/registry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/irmd/registry.c b/src/irmd/registry.c
index ae8c3b0a..04f60009 100644
--- a/src/irmd/registry.c
+++ b/src/irmd/registry.c
@@ -544,6 +544,8 @@ void registry_del_api(struct list_head * registry,
reg_api_destroy(i);
+ pthread_mutex_lock(&e->state_lock);
+
if (list_empty(&e->reg_apis)) {
if (reg_entry_has_auto_binding(e))
e->state = REG_NAME_AUTO_ACCEPT;
@@ -554,6 +556,7 @@ void registry_del_api(struct list_head * registry,
}
pthread_cond_signal(&e->state_cond);
+ pthread_mutex_unlock(&e->state_lock);
return;
}