aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2013-12-29 22:39:58 -0500
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-02-21 00:34:40 -0600
commit15a14f2eeb76f82b742d009cf320972e7d173f49 (patch)
tree1fefe4e6a07fbee9fc4908f9c68fe76bbb3f9996 /migration.c
parent88d08de7e5d08bfa44613e492cd64f8b3974d62e (diff)
migration: qmp_migrate(): keep working after syntax error
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 <mrhines@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> (cherry picked from commit c950114286ea358a93ce632db0421945e1008395) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index ff00bfbe36..79c86c92da 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;
}