diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-09 16:14:33 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-09 16:14:33 +0200 |
commit | f558d4404a9cb5b87ce3e239d8c0712bbaaba39a (patch) | |
tree | 8414f9e0d72910c4115bd9bce4e2cd4e0e52a465 /src/irmd/registry.c | |
parent | d7a3ac1eae57404630b39ad68b548910c88ed150 (diff) | |
parent | 9dce327e10bffddc9dc5058f06407e8ff12389b7 (diff) | |
download | ouroboros-f558d4404a9cb5b87ce3e239d8c0712bbaaba39a.tar.gz ouroboros-f558d4404a9cb5b87ce3e239d8c0712bbaaba39a.zip |
Merged in dstaesse/ouroboros/be-bugfixing (pull request #195)
lib: Various fixes
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r-- | src/irmd/registry.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/irmd/registry.c b/src/irmd/registry.c index ec1c3987..ae8c3b0a 100644 --- a/src/irmd/registry.c +++ b/src/irmd/registry.c @@ -503,6 +503,8 @@ struct reg_api * registry_add_api_name(struct list_head * registry, return NULL; } + pthread_mutex_lock(&e->state_lock); + if (e->state == REG_NAME_IDLE || e->state == REG_NAME_AUTO_ACCEPT || e->state == REG_NAME_AUTO_EXEC) { e->state = REG_NAME_FLOW_ACCEPT; @@ -511,6 +513,8 @@ struct reg_api * registry_add_api_name(struct list_head * registry, list_add(&i->next, &e->reg_apis); + pthread_mutex_unlock(&e->state_lock); + return i; } |