From patchwork Wed Feb 23 00:44:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 84038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D536CB7105 for ; Wed, 23 Feb 2011 12:25:04 +1100 (EST) Received: from localhost ([127.0.0.1]:58134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ps33n-00011B-1n for incoming@patchwork.ozlabs.org; Tue, 22 Feb 2011 19:58:31 -0500 Received: from [140.186.70.92] (port=36591 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ps2qe-0002qJ-Em for qemu-devel@nongnu.org; Tue, 22 Feb 2011 19:44:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ps2qd-0005Im-8U for qemu-devel@nongnu.org; Tue, 22 Feb 2011 19:44:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ps2qc-0005Id-RS for qemu-devel@nongnu.org; Tue, 22 Feb 2011 19:44:55 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1N0is8q001863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Feb 2011 19:44:54 -0500 Received: from trasno.mitica (ovpn-113-108.phx2.redhat.com [10.3.113.108]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1N0ig30026523; Tue, 22 Feb 2011 19:44:53 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 23 Feb 2011 01:44:22 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 08/22] migration: Check that migration is active before cancel it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- migration.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 397a0b9..55f58c8 100644 --- a/migration.c +++ b/migration.c @@ -138,7 +138,7 @@ int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data) { MigrationState *s = current_migration; - if (s) + if (s && s->get_status(s) == MIG_STATE_ACTIVE) s->cancel(s); return 0;