qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Change net/socket.c to use socket_*() functions


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] Change net/socket.c to use socket_*() functions
Date: Fri, 17 Jun 2016 14:38:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

Thanks, much better!  Just one thing:

On 16/06/2016 12:20, Ashijeet Acharya wrote:
> +    case SOCKET_ADDRESS_KIND_INET:
> +        buf = g_strdup(addr->u.inet.data->host);

Please include the port too here.  Also, if the host contains a colon
(which you can check with strchr), please print it as [HOST]:PORT
instead of HOST:PORT.  This will help with IPv6.

Thanks,

Paolo

> +        break;
> +
> +    case SOCKET_ADDRESS_KIND_UNIX:
> +        buf = g_strdup(addr->u.q_unix.data->path);
> +        break;
> +
> +    case SOCKET_ADDRESS_KIND_FD:
> +        buf = g_strdup(addr->u.fd.data->str);
> +        break;
> +
> +    default:
> +        error_setg(errp, "socket family %d unsupported",
> +                   addr->type);
> +        return NULL;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]