migration: Fix the re-run check of the migrate-incoming command
authorYury Kotov <yury-kotov@yandex-team.ru>
Wed, 13 Nov 2019 17:53:25 +0000 (20:53 +0300)
committerJuan Quintela <quintela@redhat.com>
Mon, 20 Jan 2020 08:10:22 +0000 (09:10 +0100)
The current check sets an error but doesn't fail the command.
This may cause a problem if new connection attempt by the same URI
affects the first connection.

Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/migration.c

index f79d0bf89af143c391b312b7d920c6b47d531aa3..e55edee6063884156b9281b3613d73d0d3cb396f 100644 (file)
@@ -1784,6 +1784,7 @@ void qmp_migrate_incoming(const char *uri, Error **errp)
     }
     if (!once) {
         error_setg(errp, "The incoming migration has already been started");
+        return;
     }
 
     qemu_start_incoming_migration(uri, &local_err);