diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-09-01 10:32:57 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-09-01 10:32:57 +0200 |
commit | fe197a226c0a7755f19a2956294ba435701a42ea (patch) | |
tree | 80e07d8bba2933e6dc9888691d023843624ccef1 /src | |
parent | f06c381a4e202a1e62ae156d87c0c2545955fc80 (diff) | |
parent | 1ea22e8293924ae671dd142b76c8d6e68fbcafde (diff) | |
download | ouroboros-fe197a226c0a7755f19a2956294ba435701a42ea.tar.gz ouroboros-fe197a226c0a7755f19a2956294ba435701a42ea.zip |
Merged in dstaesse/ouroboros/be-bugfixing (pull request #234)
irmd: Fix registering AP-I before bind
Diffstat (limited to 'src')
-rw-r--r-- | src/irmd/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 465415b8..a69dd526 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -579,6 +579,7 @@ static int bind_api(pid_t api, { char * name_dup = NULL; struct api_entry * e = NULL; + struct reg_entry * re = NULL; if (name == NULL) return -EINVAL; @@ -617,6 +618,10 @@ static int bind_api(pid_t api, return -1; } + re = registry_get_entry(&irmd->registry, name); + if (re != NULL && reg_entry_add_api(re, api) < 0) + LOG_ERR("Failed adding AP-I %d for name %s.", api, name); + pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_unlock(&irmd->state_lock); @@ -923,7 +928,7 @@ static int api_announce(pid_t api, char * apn) } list_add(&n->next, &e->names); - LOG_DBG("API %d inherits listen name %s from AP %s.", + LOG_DBG("AP-I %d inherits listen name %s from AP %s.", api, n->str, e->apn); } } @@ -1307,7 +1312,7 @@ static pid_t auto_execute(char ** argv) } if (api != 0) { - LOG_INFO("Instantiated %s as AP-i %d.", argv[0], api); + LOG_INFO("Instantiated %s as AP-I %d.", argv[0], api); return api; } |