From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [PATCH 1/4] Use getaddrinfo for migration Date: Fri, 02 Mar 2012 11:21:52 +0100 Message-ID: <4F509F40.7030602@redhat.com> References: <20120210062608.13397.43361.stgit@dhcp-8-167.nay.redhat.com> <20120210062700.13397.6305.stgit@dhcp-8-167.nay.redhat.com> <4F475988.10603@redhat.com> <4F503561.5080906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: aliguori@us.ibm.com, kvm@vger.kernel.org, quintela@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org, laine@redhat.com To: Amos Kong Return-path: In-Reply-To: <4F503561.5080906@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Am 02.03.2012 03:50, schrieb Amos Kong: > On 24/02/12 17:34, Kevin Wolf wrote: >> Am 10.02.2012 07:27, schrieb Amos Kong: >>> This allows us to use ipv4/ipv6 for migration addresses. >>> Once there, it also uses /etc/services names (it came free). >>> >>> Signed-off-by: Juan Quintela >>> Signed-off-by: Amos Kong >>> --- >>> migration-tcp.c | 60 ++++++++----------------------- >>> net.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> qemu_socket.h | 3 ++ >>> 3 files changed, 127 insertions(+), 44 deletions(-) >> >>> @@ -157,28 +141,16 @@ out2: >>> >>> int tcp_start_incoming_migration(const char *host_port) >>> { >>> - struct sockaddr_in addr; >>> - int val; >>> + int ret; >>> int s; >>> >>> DPRINTF("Attempting to start an incoming migration\n"); >>> >>> - if (parse_host_port(&addr, host_port)< 0) { >>> - fprintf(stderr, "invalid host/port combination: %s\n", host_port); >>> - return -EINVAL; >>> - } >> >> Oh, and this case doesn't print an error message any more now. > > The check work is done in tcp_start_common() > > tcp_start_incoming_migration() > -> tcp_client_start() > -> tcp_start_common() Yes, but it only return -EINVAL without printing an error message, so the failure case is silent now. Kevin