From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46631 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsAp3-0007tU-3A for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:15:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsAp2-0000Lo-3G for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:15:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsAp1-0000Le-QS for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:15:48 -0500 From: Juan Quintela In-Reply-To: (Yoshiaki Tamura's message of "Wed, 23 Feb 2011 17:31:49 +0900") References: Date: Wed, 23 Feb 2011 10:14:11 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 08/22] migration: Check that migration is active before cancel it Reply-To: quintela@redhat.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yoshiaki Tamura Cc: qemu-devel@nongnu.org Yoshiaki Tamura wrote: > 2011/2/23 Juan Quintela : >> Signed-off-by: Juan Quintela >> --- >> =C2=A0migration.c | =C2=A0 =C2=A02 +- >> =C2=A01 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 *qdi= ct, QObject **ret_data) >> =C2=A0{ >> =C2=A0 =C2=A0 MigrationState *s =3D current_migration; >> >> - =C2=A0 =C2=A0if (s) >> + =C2=A0 =C2=A0if (s && s->get_status(s) =3D=3D MIG_STATE_ACTIVE) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 s->cancel(s); >> >> =C2=A0 =C2=A0 return 0; > > Why don't you remove *s again? Removed in a next patch. Later, Juan.