gnutls-cli should handle network errors more gracefully

Nikos Mavrogiannopoulos nmav at gnutls.org
Mon Nov 26 23:34:15 CET 2012


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.






More information about the Gnutls-devel mailing list