diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-08 14:34:12 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-08 14:34:12 +0200 |
commit | 3220cd99c42f08bbd959cf73b9fc7b3ca8375676 (patch) | |
tree | ae9898536ee5767080b39e82806804fbf9911605 /src/ipcpd/normal/main.c | |
parent | 3c80fae407f451691a4a4178617986e32d0c8162 (diff) | |
parent | d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d (diff) | |
download | ouroboros-3220cd99c42f08bbd959cf73b9fc7b3ca8375676.tar.gz ouroboros-3220cd99c42f08bbd959cf73b9fc7b3ca8375676.zip |
Merged in sandervrijders/ouroboros/be-enroll (pull request #189)
ipcpd: normal: Allow exchange of static DIF information
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r-- | src/ipcpd/normal/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index 57fb72df..2d416942 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -146,7 +146,14 @@ static int normal_ipcp_enroll(char * dif_name) return -1; } - /* FIXME: Wait until state changed to ENROLLED */ + /* FIXME: Wait passively until state changed to ENROLLED */ + pthread_rwlock_rdlock(&_ipcp->state_lock); + while (_ipcp->state != IPCP_ENROLLED) { + pthread_rwlock_unlock(&_ipcp->state_lock); + sched_yield(); + pthread_rwlock_rdlock(&_ipcp->state_lock); + } + pthread_rwlock_unlock(&_ipcp->state_lock); return 0; } |