diff options
author | dimitri staessens <[email protected]> | 2016-07-14 18:54:04 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-07-14 18:54:04 +0200 |
commit | 41a86d9026d9bc8ed46274ac043eb90a867df52f (patch) | |
tree | 6b90a7e2ff29ec4eef7b73d32e35d200fb64488b /src | |
parent | b6667f9d38cf00cd45b47625efd79d9f719633ab (diff) | |
download | ouroboros-41a86d9026d9bc8ed46274ac043eb90a867df52f.tar.gz ouroboros-41a86d9026d9bc8ed46274ac043eb90a867df52f.zip |
irmd: Fix AE name always set to NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/irmd/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 17e51c05..1da4b310 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -771,8 +771,6 @@ static struct port_map_entry * flow_accept(pid_t api, return NULL; } - rne->req_ae_name = NULL; - if (dst_ae_name != NULL) *dst_ae_name = rne->req_ae_name; @@ -1179,14 +1177,17 @@ static struct port_map_entry * flow_req_arr(pid_t api, pthread_mutex_unlock(&rne->state_lock); + pthread_rwlock_unlock(&instance->state_lock); + while (acc_wait) { + pthread_rwlock_rdlock(&instance->state_lock); pthread_mutex_lock(&rne->state_lock); - acc_wait = (rne->state == REG_NAME_FLOW_ARRIVED); + acc_wait = (rne->state == REG_NAME_FLOW_ARRIVED && + instance->state == IRMD_RUNNING); pthread_mutex_unlock(&rne->state_lock); + pthread_rwlock_unlock(&instance->state_lock); } - pthread_rwlock_unlock(&instance->state_lock); - return pme; } |