From 5cc79cfeb7a33c93ae9ef5781f9b0ecd4a958bee Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 12 Feb 2017 20:22:56 +0100 Subject: ipcpd: Fix timeout in ipcp_wait_state --- src/ipcpd/ipcp.c | 4 ++-- 1 file 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); -- cgit v1.2.3