From patchwork Fri Sep 23 12:57:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 116080 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8283D1007D4 for ; Fri, 23 Sep 2011 23:54:24 +1000 (EST) Received: from localhost ([::1]:44416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R76Cr-00043l-Ip for incoming@patchwork.ozlabs.org; Fri, 23 Sep 2011 09:54:21 -0400 Received: from eggs.gnu.org ([140.186.70.92]:33966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R75KV-00024p-FG for qemu-devel@nongnu.org; Fri, 23 Sep 2011 08:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R75KS-0004vQ-8I for qemu-devel@nongnu.org; Fri, 23 Sep 2011 08:58:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R75KR-0004vC-Nx for qemu-devel@nongnu.org; Fri, 23 Sep 2011 08:58:08 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8NCw60q001604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Sep 2011 08:58:07 -0400 Received: from neno.neno (ovpn-116-44.ams2.redhat.com [10.36.116.44]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8NCvZlv021572; Fri, 23 Sep 2011 08:58:06 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 23 Sep 2011 14:57:10 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 21/23] migration: Don't use callback on file defining it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- migration-tcp.c | 4 ++-- migration-unix.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index f6b2288..bd3aa3a 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -58,7 +58,7 @@ static void tcp_wait_for_connect(void *opaque) DPRINTF("connect completed\n"); do { ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize); - } while (ret == -1 && (s->get_error(s)) == EINTR); + } while (ret == -1 && (socket_error()) == EINTR); if (ret < 0) { migrate_fd_error(s); @@ -98,7 +98,7 @@ int tcp_start_outgoing_migration(MigrationState *s, const char *host_port) do { ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr)); if (ret == -1) - ret = -(s->get_error(s)); + ret = -(socket_error()); if (ret == -EINPROGRESS || ret == -EWOULDBLOCK) qemu_set_fd_handler2(s->fd, NULL, NULL, tcp_wait_for_connect, s); diff --git a/migration-unix.c b/migration-unix.c index d6f315a..7205b25 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -57,7 +57,7 @@ static void unix_wait_for_connect(void *opaque) DPRINTF("connect completed\n"); do { ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize); - } while (ret == -1 && (s->get_error(s)) == EINTR); + } while (ret == -1 && errno == EINTR); if (ret < 0) { migrate_fd_error(s); @@ -97,7 +97,7 @@ int unix_start_outgoing_migration(MigrationState *s, const char *path) do { ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr)); if (ret == -1) - ret = -(s->get_error(s)); + ret = -errno; if (ret == -EINPROGRESS || ret == -EWOULDBLOCK) qemu_set_fd_handler2(s->fd, NULL, NULL, unix_wait_for_connect, s); @@ -130,7 +130,7 @@ static void unix_accept_incoming_migration(void *opaque) do { c = qemu_accept(s, (struct sockaddr *)&addr, &addrlen); - } while (c == -1 && socket_error() == EINTR); + } while (c == -1 && errno == EINTR); DPRINTF("accepted migration\n");