diff options
| author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-09 16:49:56 +0100 | 
|---|---|---|
| committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-09 18:11:48 +0100 | 
| commit | 6785ca65ab48f1a29914c1784a24009964ec4720 (patch) | |
| tree | 31828a5eb1a646883c3f582795c8ffc7c990b35b /src/ipcpd/shim-eth-llc | |
| parent | 275dc65b22e39654e4dfc9cbd13277e490c8dccd (diff) | |
| download | ouroboros-6785ca65ab48f1a29914c1784a24009964ec4720.tar.gz ouroboros-6785ca65ab48f1a29914c1784a24009964ec4720.zip | |
ipcpd, lib: Report IPCP creation failure
The IPCP will now respond with an ipcp_create_r message when it fails,
informing the IRMd.
Also adds some const qualifiers in the public headers and fixes
some formatting in dev.c.
Diffstat (limited to 'src/ipcpd/shim-eth-llc')
| -rw-r--r-- | src/ipcpd/shim-eth-llc/main.c | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index 35ec0297..15482f87 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -1129,11 +1129,13 @@ int main(int    argc,          if (ipcp_init(argc, argv, THIS_TYPE, ð_llc_ops) < 0) {                  log_err("Failed to init IPCP."); +                ipcp_create_r(getpid(), -1);                  exit(EXIT_FAILURE);          }          if (eth_llc_data_init() < 0) {                  log_err("Failed to init shim-eth-llc data."); +                ipcp_create_r(getpid(), -1);                  ipcp_fini();                  exit(EXIT_FAILURE);          } @@ -1143,6 +1145,7 @@ int main(int    argc,          if (ipcp_boot() < 0) {                  log_err("Failed to boot IPCP."); +                ipcp_create_r(getpid(), -1);                  eth_llc_data_fini();                  ipcp_fini();                  exit(EXIT_FAILURE); @@ -1150,7 +1153,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(); | 
