diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-08 13:37:30 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-08 14:33:31 +0200 |
commit | d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d (patch) | |
tree | ae9898536ee5767080b39e82806804fbf9911605 /src/ipcpd/normal/fmgr.c | |
parent | 3c80fae407f451691a4a4178617986e32d0c8162 (diff) | |
download | ouroboros-d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d.tar.gz ouroboros-d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d.zip |
ipcpd: normal: Allow exchange of static DIF information
This adds the functionality of exchanging the static DIF information
between 2 DIF members. After exchange the enrollment is stopped, and
the IPCP that initiated enrollment transitions to the enrolled state.
Diffstat (limited to 'src/ipcpd/normal/fmgr.c')
-rw-r--r-- | src/ipcpd/normal/fmgr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c index a539b289..f9de16c4 100644 --- a/src/ipcpd/normal/fmgr.c +++ b/src/ipcpd/normal/fmgr.c @@ -82,8 +82,8 @@ static void * fmgr_listen(void * o) /* FIXME: Avoid busy wait and react to pthread_cond_t */ pthread_rwlock_rdlock(&_ipcp->state_lock); - while (_ipcp->state != IPCP_ENROLLED || - _ipcp->state != IPCP_SHUTDOWN) { + while (!(_ipcp->state == IPCP_ENROLLED || + _ipcp->state == IPCP_SHUTDOWN)) { pthread_rwlock_unlock(&_ipcp->state_lock); sched_yield(); pthread_rwlock_rdlock(&_ipcp->state_lock); |