From db70e14fcdf8b8ae290d50cae55eb43ca9c00684 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Tue, 7 Feb 2012 20:21:08 +1100 Subject: [PATCH] Make sure ipc functions return CS_ERR_TRY_AGAIN and not CS_ERR_TIMEOUT This is because most applications that use corosync do not test for TIMEOUT but only for TRY_AGAIN. Signed-off-by: Angus Salkeld Reviewed-and-Tested-by: Fabio M. Di Nitto --- include/corosync/corotypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/corosync/corotypes.h b/include/corosync/corotypes.h index 74183d86..c67bf29e 100644 --- a/include/corosync/corotypes.h +++ b/include/corosync/corotypes.h @@ -151,6 +151,7 @@ static inline cs_error_t qb_to_cs_error (int result) case ENOMEM: err = CS_ERR_NO_MEMORY; break; + case ETIMEDOUT: case EAGAIN: err = CS_ERR_TRY_AGAIN; break; @@ -158,7 +159,6 @@ static inline cs_error_t qb_to_cs_error (int result) err = CS_ERR_FAILED_OPERATION; break; case ETIME: - case ETIMEDOUT: err = CS_ERR_TIMEOUT; break; case EINVAL: