Re: [PATCH 3/3] Check socket_recv error code in ipc_dispatch_get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK

On 12/6/2012 10:55 AM, Jan Friesse wrote:
> Also do not assert on error.
> 
> Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
> ---
>  lib/coroipcc.c |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/coroipcc.c b/lib/coroipcc.c
> index 30b1474..3ad4921 100644
> --- a/lib/coroipcc.c
> +++ b/lib/coroipcc.c
> @@ -908,14 +908,9 @@ coroipcc_dispatch_get (
>  	}
>  
>  	error = socket_recv (ipc_instance->fd, &buf, 1);
> -#if defined(COROSYNC_SOLARIS) || defined(COROSYNC_BSD) || defined(COROSYNC_DARWIN)
> -	/* On many OS poll() never returns POLLHUP or POLLERR.
> -	 * EOF is detected when recvmsg() return 0.
> -	 */
> -	if ( error == CS_ERR_LIBRARY )
> +	if (error != CS_OK) {
>  		goto error_put;
> -#endif
> -	assert (error == CS_OK);
> +	}
>  
>  	if (shared_mem_dispatch_bytes_left (ipc_instance) > (ipc_instance->dispatch_size/2)) {
>  		/*
> 

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux