summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-02-09 17:44:58 +0000
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-02-09 17:44:58 +0000
commit0557bc02b963bab6f690b410fe937a9f487a84ba (patch)
tree31828a5eb1a646883c3f582795c8ffc7c990b35b /src/ipcpd/shim-udp
parent275dc65b22e39654e4dfc9cbd13277e490c8dccd (diff)
parent6785ca65ab48f1a29914c1784a24009964ec4720 (diff)
downloadouroboros-0557bc02b963bab6f690b410fe937a9f487a84ba.tar.gz
ouroboros-0557bc02b963bab6f690b410fe937a9f487a84ba.zip
Merged in dstaesse/ouroboros/be-create_r (pull request #367)
ipcpd, lib: Report IPCP creation failure
Diffstat (limited to 'src/ipcpd/shim-udp')
-rw-r--r--src/ipcpd/shim-udp/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index 2a73077c..47628a3e 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -1196,11 +1196,13 @@ int main(int argc,
if (ipcp_init(argc, argv, THIS_TYPE, &udp_ops) < 0) {
log_err("Failed to init IPCP.");
+ ipcp_create_r(getpid(), -1);
exit(EXIT_FAILURE);
}
if (udp_data_init() < 0) {
log_err("Failed to init shim-udp data.");
+ ipcp_create_r(getpid(), -1);
ipcp_fini();
exit(EXIT_FAILURE);
}
@@ -1210,6 +1212,7 @@ int main(int argc,
if (ipcp_boot() < 0) {
log_err("Failed to boot IPCP.");
+ ipcp_create_r(getpid(), -1);
udp_data_fini();
ipcp_fini();
exit(EXIT_FAILURE);
@@ -1217,7 +1220,7 @@ int main(int argc,
pthread_sigmask(SIG_UNBLOCK, &sigset, NULL);
- if (ipcp_create_r(getpid())) {
+ if (ipcp_create_r(getpid(), 0)) {
log_err("Failed to notify IRMd we are initialized.");
ipcp_set_state(IPCP_NULL);
ipcp_shutdown();