summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/local/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c
index 99580a45..a6076800 100644
--- a/src/ipcpd/local/main.c
+++ b/src/ipcpd/local/main.c
@@ -261,14 +261,14 @@ static int ipcp_local_bootstrap(struct dif_config * conf)
return -1;
}
+ pthread_rwlock_wrlock(&_ipcp->state_lock);
+
if (_ipcp->state != IPCP_INIT) {
pthread_rwlock_unlock(&_ipcp->state_lock);
LOG_ERR("IPCP in wrong state.");
return -1;
}
- pthread_rwlock_wrlock(&_ipcp->state_lock);
-
_ipcp->state = IPCP_ENROLLED;
pthread_create(&_ap_instance->sduloop,