From patchwork Wed Oct 10 14:02:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 190702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 579CC2C008B for ; Thu, 11 Oct 2012 02:45:02 +1100 (EST) Received: from localhost ([::1]:37928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwtT-00030h-Q6 for incoming@patchwork.ozlabs.org; Wed, 10 Oct 2012 10:04:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwsu-0001si-Hi for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLwsk-0002A5-VT for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:40 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:43012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwsk-00027x-P2 for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:30 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so618733pad.4 for ; Wed, 10 Oct 2012 07:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=JDf7sMuLoFbqb1TYyHYD1jIDuNnarjpwDOtQ0mWVuU0=; b=BZDEo7ylclHsvjdAffUz+LaQ0UQvsyeqOjIb6tqoeYDybD23z1v0RytUjUd7fVoKs4 IZsFnYsUW8FTvO5wvuKfxv28OFnX+rXJH0ckrT9WvvDfoh3vi3eVpg3zZKXtXhF0jsgs JHkKQlFxBB1Lj5xNxGiwi59OgyCgle5HFfIa+YLBjjuqdV2HvT/gvQUqXTt5mB86tKLQ tVlGbP1LUUcxlGau4Jf/Cp2RRSj2UL5ftj+NKiJ/NIDvQ3M/i0Uzg2uBJLseuaGgCVj5 jped129bM7qOvnV2i01N+n1fiwah7KmqshpFhvEDfNpy+QfkPo1OHXBnchBFwalXAzYe yFnA== Received: by 10.66.86.65 with SMTP id n1mr13077327paz.48.1349877810399; Wed, 10 Oct 2012 07:03:30 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id n7sm905723pav.26.2012.10.10.07.03.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 07:03:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 10 Oct 2012 16:02:47 +0200 Message-Id: <1349877786-23514-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> References: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH 06/25] migration: centralize call to migrate_fd_error() 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 The call to migrate_fd_error() was missing for non-socket backends, so centralize it in qmp_migrate(). Before: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate (qemu) After: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate capabilities: xbzrle: off Migration status: failed total time: 0 milliseconds (The awful error message will be fixed later in the series). Reviewed-by: Luiz Capitulino Signed-off-by: Paolo Bonzini --- migration-tcp.c | 1 - migration-unix.c | 1 - migration.c | 1 + 3 file modificati, 1 inserzione(+), 2 rimozioni(-) diff --git a/migration-tcp.c b/migration-tcp.c index 78337a3..e8bc76a 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -79,7 +79,6 @@ int tcp_start_outgoing_migration(MigrationState *s, const char *host_port, s->fd = inet_nonblocking_connect(host_port, tcp_wait_for_connect, s, &local_err); if (local_err != NULL) { - migrate_fd_error(s); error_propagate(errp, local_err); return -1; } diff --git a/migration-unix.c b/migration-unix.c index 169de88..d349662 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -111,7 +111,6 @@ int unix_start_outgoing_migration(MigrationState *s, const char *path) if (ret < 0) { DPRINTF("connect failed\n"); - migrate_fd_error(s); return ret; } migrate_fd_connect(s); diff --git a/migration.c b/migration.c index 8a04174..a56358e 100644 --- a/migration.c +++ b/migration.c @@ -522,6 +522,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, } if (ret < 0 || local_err) { + migrate_fd_error(s); if (!local_err) { error_set_errno(errp, -ret, QERR_UNDEFINED_ERROR); } else {