[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/5] sheepdog: use inet_connect to simplify c
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/5] sheepdog: use inet_connect to simplify connect code |
Date: |
Tue, 29 Jan 2013 10:11:44 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 01/29/2013 01:56 AM, MORITA Kazutaka wrote:
> This uses the form "<host>:<port>" for the representation of the
> sheepdog server to use inet_connect.
>
> Signed-off-by: MORITA Kazutaka <address@hidden>
> ---
> block/sheepdog.c | 111 ++++++++++++++---------------------------------------
> 1 files changed, 30 insertions(+), 81 deletions(-)
>
> /* sheepdog[+tcp]://[host:port]/vdiname */
> - s->addr = g_strdup(uri->server ?: SD_DEFAULT_ADDR);
> - if (uri->port) {
> - s->port = g_strdup_printf("%d", uri->port);
> - } else {
> - s->port = g_strdup(SD_DEFAULT_PORT);
> - }
> + s->host_spec = g_strdup_printf("%s:%d", uri->server ?: SD_DEFAULT_ADDR,
> + uri->port ?: SD_DEFAULT_PORT);
Is this going to properly handle IPv6 addresses, which need to use
brackets around the host portion, as in:
sheepdog+tcp://[::1]:port/vdiname
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 0/5] sheepdog: unix domain socket support, MORITA Kazutaka, 2013/01/29
- [Qemu-devel] [PATCH v4 1/5] slirp/tcp_subr.c: fix coding style in tcp_connect, MORITA Kazutaka, 2013/01/29
- [Qemu-devel] [PATCH v4 5/5] sheepdog: add support for connecting to unix domain socket, MORITA Kazutaka, 2013/01/29
- [Qemu-devel] [PATCH v4 4/5] sheepdog: use inet_connect to simplify connect code, MORITA Kazutaka, 2013/01/29
- Re: [Qemu-devel] [PATCH v4 4/5] sheepdog: use inet_connect to simplify connect code,
Eric Blake <=
- [Qemu-devel] [PATCH v4 3/5] sheepdog: accept URIs, MORITA Kazutaka, 2013/01/29
- [Qemu-devel] [PATCH v4 2/5] move socket_set_nodelay to osdep.c, MORITA Kazutaka, 2013/01/29