diff options
author | dimitri staessens <[email protected]> | 2016-08-10 13:03:33 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-08-10 13:03:33 +0200 |
commit | 9740c4bf2966d57d6f7e0d034a862211cb3814c4 (patch) | |
tree | 9b33b5d1888cd4fb338b57b7b1aa90349668eb8b /src/ipcpd/local/main.c | |
parent | aca897331ff55c80d926b0bdb90f1c8962bf7a6e (diff) | |
parent | e5cb8042c9f0c6374c4f14bf7ff3f4fe3cdcd155 (diff) | |
download | ouroboros-9740c4bf2966d57d6f7e0d034a862211cb3814c4.tar.gz ouroboros-9740c4bf2966d57d6f7e0d034a862211cb3814c4.zip |
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-bugfixing
Diffstat (limited to 'src/ipcpd/local/main.c')
-rw-r--r-- | src/ipcpd/local/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index 99580a45..3f5bf908 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, @@ -621,6 +621,12 @@ int main(int argc, char * argv[]) pthread_rwlock_unlock(&_ipcp->state_lock); + if (ipcp_create_r(getpid())) { + LOG_ERR("Failed to notify IRMd we are initialized."); + close_logfile(); + exit(EXIT_FAILURE); + } + pthread_join(_ap_instance->mainloop, NULL); shim_ap_fini(); |