diff options
author | Sander Vrijders <[email protected]> | 2017-02-09 17:44:58 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-02-09 17:44:58 +0000 |
commit | 0557bc02b963bab6f690b410fe937a9f487a84ba (patch) | |
tree | 31828a5eb1a646883c3f582795c8ffc7c990b35b /src/irmd | |
parent | 275dc65b22e39654e4dfc9cbd13277e490c8dccd (diff) | |
parent | 6785ca65ab48f1a29914c1784a24009964ec4720 (diff) | |
download | ouroboros-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/irmd')
-rw-r--r-- | src/irmd/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index c029b4cf..74cb8359 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -303,10 +303,14 @@ static pid_t create_ipcp(char * name, return api->pid; } -static int create_ipcp_r(pid_t api) +static int create_ipcp_r(pid_t api, + int result) { struct list_head * pos = NULL; + if (result != 0) + return result; + pthread_rwlock_rdlock(&irmd->state_lock); pthread_rwlock_rdlock(&irmd->reg_lock); @@ -1821,7 +1825,7 @@ void * mainloop(void * o) break; case IRM_MSG_CODE__IPCP_CREATE_R: ret_msg.has_result = true; - ret_msg.result = create_ipcp_r(msg->api); + ret_msg.result = create_ipcp_r(msg->api, msg->result); break; case IRM_MSG_CODE__IRM_DESTROY_IPCP: ret_msg.has_result = true; |