From d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 8 Aug 2016 13:37:30 +0200 Subject: 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. --- src/ipcpd/normal/fmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/normal/fmgr.c') 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); -- cgit v1.2.3