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@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
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;