diff options
author | dimitri staessens <[email protected]> | 2017-02-12 20:22:56 +0100 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-02-12 22:19:50 +0100 |
commit | 5cc79cfeb7a33c93ae9ef5781f9b0ecd4a958bee (patch) | |
tree | d4926c7856344dcc4aba9838b734ad0c67acb4ce /src/ipcpd/ipcp.c | |
parent | cf5087a8397e379d059998b27ef86a1bb68d70ff (diff) | |
download | ouroboros-5cc79cfeb7a33c93ae9ef5781f9b0ecd4a958bee.tar.gz ouroboros-5cc79cfeb7a33c93ae9ef5781f9b0ecd4a958bee.zip |
ipcpd: Fix timeout in ipcp_wait_state
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r-- | src/ipcpd/ipcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 24d8da46..19b3a721 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -145,7 +145,6 @@ static void * ipcp_main_loop(void * o) } ret_msg.has_result = true; ret_msg.result = ipcpi.ops->ipcp_enroll(msg->dif_name); - break; case IPCP_MSG_CODE__IPCP_NAME_REG: if (ipcpi.ops->ipcp_name_reg == NULL) { @@ -459,7 +458,8 @@ int ipcp_wait_state(enum ipcp_state state, while (ipcpi.state != state && ipcpi.state != IPCP_SHUTDOWN - && ipcpi.state != IPCP_NULL) { + && ipcpi.state != IPCP_NULL + && ret != -ETIMEDOUT) { if (timeout == NULL) ret = -pthread_cond_wait(&ipcpi.state_cond, &ipcpi.state_mtx); |