From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlK8-0006N5-5k for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:19:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGlJt-0001pL-NJ for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:19:08 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:51407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlJt-0001op-Hs for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:53 -0500 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Feb 2014 03:18:53 -0500 From: Michael Roth Date: Fri, 21 Feb 2014 02:17:15 -0600 Message-Id: <1392970647-21528-40-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 39/51] migration: qmp_migrate(): keep working after syntax error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, qemu-stable@nongnu.org, Petar.Jovanovic@imgtec.com From: Luiz Capitulino If a user or QMP client enter a bad syntax for the migrate command in QMP/HMP, then the migrate command will never succeed from that point on. For example, if you enter: (qemu) migrate tcp;0:4444 migrate: Parameter 'uri' expects a valid migration protocol Then the migrate command will always fail from now on: (qemu) migrate tcp:0:4444 migrate: There's a migration process in progress The problem is that qmp_migrate() sets the migration status to MIG_STATE_SETUP and doesn't reset it on syntax error. This bug was introduced by commit 29ae8a4133082e16970c9d4be09f4b6a15034617. Reviewed-by: Michael R. Hines Signed-off-by: Luiz Capitulino (cherry picked from commit c950114286ea358a93ce632db0421945e1008395) Signed-off-by: Michael Roth --- migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration.c b/migration.c index ff00bfb..79c86c9 100644 --- a/migration.c +++ b/migration.c @@ -437,6 +437,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, #endif } else { error_set(errp, QERR_INVALID_PARAMETER_VALUE, "uri", "a valid migration protocol"); + s->state = MIG_STATE_ERROR; return; } -- 1.7.9.5