summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-08-10 12:55:23 +0200
committerdimitri staessens <[email protected]>2016-08-10 12:55:23 +0200
commite5cb8042c9f0c6374c4f14bf7ff3f4fe3cdcd155 (patch)
tree31c27f46ba0a5f4981aa7522b11d133e1288c26d /src/ipcpd/normal
parent0ec8f7b6d977a9cc469445d4990d432253f979d9 (diff)
parent155fbfb32b9a69705a06a5771bd146c1bed22821 (diff)
downloadouroboros-e5cb8042c9f0c6374c4f14bf7ff3f4fe3cdcd155.tar.gz
ouroboros-e5cb8042c9f0c6374c4f14bf7ff3f4fe3cdcd155.zip
Merged in sandervrijders/ouroboros/be-create-ipcp (pull request #200)
ipcp, irmd, lib: Notify IRMd upon IPCP initialization
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r--src/ipcpd/normal/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index 2d416942..38789ddd 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -27,6 +27,7 @@
#include <ouroboros/shm_du_map.h>
#include <ouroboros/shm_ap_rbuff.h>
#include <ouroboros/dev.h>
+#include <ouroboros/ipcp.h>
#include <stdbool.h>
#include <signal.h>
@@ -326,6 +327,15 @@ 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.");
+ normal_ipcp_data_destroy();
+ fmgr_fini();
+ free(_ipcp);
+ close_logfile();
+ exit(EXIT_FAILURE);
+ }
+
pthread_join(normal_data(_ipcp)->mainloop, NULL);
normal_ipcp_data_destroy();