diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-10 12:27:41 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-10 12:54:38 +0200 |
commit | 155fbfb32b9a69705a06a5771bd146c1bed22821 (patch) | |
tree | 0a9654e87dd7d5818c3ecedd850a6b6f5641e369 /src/ipcpd/local/main.c | |
parent | 3eb6acfd135cdfb82d19a4f445776ea2f13fd4e1 (diff) | |
download | ouroboros-155fbfb32b9a69705a06a5771bd146c1bed22821.tar.gz ouroboros-155fbfb32b9a69705a06a5771bd146c1bed22821.zip |
ipcp, irmd, lib: Notify IRMd upon IPCP initialization
This will notify the IRMd when the IPCP is initialized and ready to
receive messages. Previously a bootstrap could fail since the IPCP was
not listening to the socket yet.
Diffstat (limited to 'src/ipcpd/local/main.c')
-rw-r--r-- | src/ipcpd/local/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index 99580a45..62f9e0aa 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -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(); |