Re: [PATCH 1/2] Close sockets after deleting from poll

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

 



Reviewed-by: Steven Dake <sdake@xxxxxxxxxx>

On 08/09/2012 04:50 AM, Jan Friesse wrote:
> This will remove (non critical) debug message from QB about polling on
> closed FD.
> 
> Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
> ---
>  exec/totemudp.c  |    8 ++++----
>  exec/totemudpu.c |    4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/exec/totemudp.c b/exec/totemudp.c
> index ac1d81f..0c4bb0b 100644
> --- a/exec/totemudp.c
> +++ b/exec/totemudp.c
> @@ -374,17 +374,17 @@ int totemudp_finalize (
>  	int res = 0;
>  
>  	if (instance->totemudp_sockets.mcast_recv > 0) {
> -		close (instance->totemudp_sockets.mcast_recv);
>  	 	qb_loop_poll_del (instance->totemudp_poll_handle,
>  			instance->totemudp_sockets.mcast_recv);
> +		close (instance->totemudp_sockets.mcast_recv);
>  	}
>  	if (instance->totemudp_sockets.mcast_send > 0) {
>  		close (instance->totemudp_sockets.mcast_send);
>  	}
>  	if (instance->totemudp_sockets.token > 0) {
> -		close (instance->totemudp_sockets.token);
>  		qb_loop_poll_del (instance->totemudp_poll_handle,
>  			instance->totemudp_sockets.token);
> +		close (instance->totemudp_sockets.token);
>  	}
>  
>  	return (res);
> @@ -533,17 +533,17 @@ static void timer_function_netif_check_timeout (
>  	}
>  
>  	if (instance->totemudp_sockets.mcast_recv > 0) {
> -		close (instance->totemudp_sockets.mcast_recv);
>  	 	qb_loop_poll_del (instance->totemudp_poll_handle,
>  			instance->totemudp_sockets.mcast_recv);
> +		close (instance->totemudp_sockets.mcast_recv);
>  	}
>  	if (instance->totemudp_sockets.mcast_send > 0) {
>  		close (instance->totemudp_sockets.mcast_send);
>  	}
>  	if (instance->totemudp_sockets.token > 0) {
> -		close (instance->totemudp_sockets.token);
>  		qb_loop_poll_del (instance->totemudp_poll_handle,
>  			instance->totemudp_sockets.token);
> +		close (instance->totemudp_sockets.token);
>  	}
>  
>  	if (interface_up == 0) {
> diff --git a/exec/totemudpu.c b/exec/totemudpu.c
> index 5647fc5..314d186 100644
> --- a/exec/totemudpu.c
> +++ b/exec/totemudpu.c
> @@ -377,9 +377,9 @@ int totemudpu_finalize (
>  	int res = 0;
>  
>  	if (instance->token_socket > 0) {
> -		close (instance->token_socket);
>  		qb_loop_poll_del (instance->totemudpu_poll_handle,
>  			instance->token_socket);
> +		close (instance->token_socket);
>  	}
>  
>  	return (res);
> @@ -510,9 +510,9 @@ static void timer_function_netif_check_timeout (
>  	}
>  
>  	if (instance->token_socket > 0) {
> -		close (instance->token_socket);
>  		qb_loop_poll_del (instance->totemudpu_poll_handle,
>  			instance->token_socket);
> +		close (instance->token_socket);
>  	}
>  
>  	if (interface_up == 0) {
> 

_______________________________________________
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