Instead of enumerating all states which need to be turned into
QEMU_DOMAIN_JOB_STATUS_FAILED (and failing to add all of them), it's
better to mention just the one which needs to be left alone.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 8a529f9ad..f785c308c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3942,9 +3942,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
if (iothread)
qemuMigrationStopTunnel(iothread, true);
- if (priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_ACTIVE ||
- priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_MIGRATING ||
- priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_POSTCOPY)
+ if (priv->job.current->status != QEMU_DOMAIN_JOB_STATUS_CANCELED)
priv->job.current->status = QEMU_DOMAIN_JOB_STATUS_FAILED;
goto cleanup;
--
2.14.2