soccr: print errno if connect() failed

Submitted by Andrey Vagin on Sept. 20, 2018, 10:41 p.m.

Details

Message ID 20180920224059.30879-1-avagin@virtuozzo.com
State Accepted
Series "soccr: print errno if connect() failed"
Headers show

Commit Message

Andrey Vagin Sept. 20, 2018, 10:41 p.m.
https://github.com/checkpoint-restore/criu/issues/557

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 soccr/soccr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/soccr/soccr.c b/soccr/soccr.c
index d63a2ce2b..1e4827e48 100644
--- a/soccr/soccr.c
+++ b/soccr/soccr.c
@@ -526,7 +526,7 @@  static int libsoccr_set_sk_data_noq(struct libsoccr_sk *sk,
 
 	if (connect(sk->fd, &sk->dst_addr->sa, addr_size) == -1 &&
 						errno != EINPROGRESS) {
-		loge("Can't connect inet socket back\n");
+		logerr("Can't connect inet socket back");
 		return -1;
 	}
 

Comments

Adrian Reber Sept. 21, 2018, 7:07 a.m.
Not sure if it makes sense to comment on one-line patches, but this
is a good idea. So:

Acked-by: Adrian Reber <areber@redhat.com>

On Thu, Sep 20, 2018 at 10:41:12PM +0000, Andrey Vagin wrote:
> https://github.com/checkpoint-restore/criu/issues/557
> 
> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
> ---
>  soccr/soccr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/soccr/soccr.c b/soccr/soccr.c
> index d63a2ce2b..1e4827e48 100644
> --- a/soccr/soccr.c
> +++ b/soccr/soccr.c
> @@ -526,7 +526,7 @@ static int libsoccr_set_sk_data_noq(struct libsoccr_sk *sk,
>  
>  	if (connect(sk->fd, &sk->dst_addr->sa, addr_size) == -1 &&
>  						errno != EINPROGRESS) {
> -		loge("Can't connect inet socket back\n");
> +		logerr("Can't connect inet socket back");
>  		return -1;
>  	}
>  
> -- 
> 2.14.4
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
Andrey Vagin Sept. 24, 2018, 9:31 p.m.
Applied

On Thu, Sep 20, 2018 at 03:41:12PM -0700, Andrey Vagin wrote:
> https://github.com/checkpoint-restore/criu/issues/557
> 
> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
> ---
>  soccr/soccr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/soccr/soccr.c b/soccr/soccr.c
> index d63a2ce2b..1e4827e48 100644
> --- a/soccr/soccr.c
> +++ b/soccr/soccr.c
> @@ -526,7 +526,7 @@ static int libsoccr_set_sk_data_noq(struct libsoccr_sk *sk,
>  
>  	if (connect(sk->fd, &sk->dst_addr->sa, addr_size) == -1 &&
>  						errno != EINPROGRESS) {
> -		loge("Can't connect inet socket back\n");
> +		logerr("Can't connect inet socket back");
>  		return -1;
>  	}
>  
> -- 
> 2.14.4
>