diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-11-30 18:21:19 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 10:48:51 -0600 |
commit | 1302425d737857e7598b812eb25c159f31d4ab27 (patch) | |
tree | 5757f8ab74686e8a18dd318e651d8e7a29ba47b6 /migration.c | |
parent | 5d39c799c3245244ebb1e89da0177dbc089962b2 (diff) |
migration: Catch multiple start commands
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/migration.c b/migration.c index dcde7c38d..d7fb75676 100644 --- a/migration.c +++ b/migration.c @@ -58,7 +58,13 @@ void do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) const char *p; int detach = qdict_get_int(qdict, "detach"); const char *uri = qdict_get_str(qdict, "uri"); - + + if (current_migration && + current_migration->get_status(current_migration) == MIG_STATE_ACTIVE) { + monitor_printf(mon, "migration already in progress\n"); + return; + } + if (strstart(uri, "tcp:", &p)) s = tcp_start_outgoing_migration(p, max_throttle, detach, (int)qdict_get_int(qdict, "blk"), |