On Thu, Jun 09, 2011 at 04:44:24PM +0200, Jan Friesse wrote:
> According specification recvmsg can return 0, which means that
> connection is closed. We had this check, but limited only for systems
> other then Linux. recvmsg can return 0 even on Linux, so check is now
> applied on all systems.

Yes, I don't why left Linux out.

Reviewed-by: Angus Salkeld <[email protected]>

> 
> Signed-off-by: Jan Friesse <[email protected]>
> ---
>  lib/coroipcc.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/coroipcc.c b/lib/coroipcc.c
> index b017155..d1f82e0 100644
> --- a/lib/coroipcc.c
> +++ b/lib/coroipcc.c
> @@ -227,15 +227,13 @@ retry_recv:
>                       goto res_exit;
>               }
>       }
> -#if defined(COROSYNC_SOLARIS) || defined(COROSYNC_BSD) || 
> defined(COROSYNC_DARWIN)
> -     /* On many OS poll never return POLLHUP or POLLERR.
> -      * EOF is detected when recvmsg return 0.
> +     /*
> +      * EOF is also detected when recvmsg return 0.
>        */
>       if (result == 0) {
>               res = CS_ERR_LIBRARY;
>               goto res_exit;
>       }
> -#endif
>  
>       processed += result;
>       if (processed != len) {
> -- 
> 1.7.1
> 
> _______________________________________________
> Openais mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to