[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnutls-cli should handle network errors more gracefully
From: |
Nikos Mavrogiannopoulos |
Subject: |
Re: gnutls-cli should handle network errors more gracefully |
Date: |
Mon, 26 Nov 2012 23:34:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10 |
On 11/26/2012 11:18 PM, Mantas Mikulėnas wrote:
> diff --git a/src/socket.c b/src/socket.c
> index f901482..9a2ce10 100644
> --- a/src/socket.c
> +++ b/src/socket.c
> @@ -176,14 +176,14 @@ socket_open (socket_st * hd, const char *hostname,
> const char *service, int udp)
> }
>
>
> - printf ("Connecting to '%s:%s'...\n", hostname, portname);
> + printf ("Connecting to [%s]:%s...\n", buffer, portname);
>
> err = connect (sd, ptr->ai_addr, ptr->ai_addrlen);
> if (err < 0)
> {
> - fprintf (stderr, "Cannot connect to %s:%s: %s\n", hostname,
> + fprintf (stderr, "Cannot connect to [%s]:%s: %s\n", buffer,
> portname, strerror (errno));
> - exit (1);
> + continue;
Thanks. Applied.