From patchwork Wed Feb 23 21:47:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 84247 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 2AAFAB7257 for ; Thu, 24 Feb 2011 08:59:33 +1100 (EST) Received: from localhost ([127.0.0.1]:38481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsMjs-0004n5-1P for incoming@patchwork.ozlabs.org; Wed, 23 Feb 2011 16:59:16 -0500 Received: from [140.186.70.92] (port=35465 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsMZ7-0000Lm-2q for qemu-devel@nongnu.org; Wed, 23 Feb 2011 16:48:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsMYu-0005AK-7N for qemu-devel@nongnu.org; Wed, 23 Feb 2011 16:47:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsMYt-0005A8-TA for qemu-devel@nongnu.org; Wed, 23 Feb 2011 16:47:56 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1NLltD7022126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Feb 2011 16:47:55 -0500 Received: from trasno.mitica (ovpn-113-97.phx2.redhat.com [10.3.113.97]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1NLlhC0020923; Wed, 23 Feb 2011 16:47:54 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 23 Feb 2011 22:47:17 +0100 Message-Id: <20fe515f24d4ebb03ea4f181e9edc9e62d380836.1298492768.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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/28] 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 | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 1105757..e8e593d 100644 --- a/migration.c +++ b/migration.c @@ -139,9 +139,9 @@ 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; }