Patchwork [25/34] migration: move migration notifier

login
register
mail settings
Submitter Juan Quintela
Date Dec. 19, 2012, 12:33 p.m.
Message ID <1355920437-29882-26-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/207396/
State New
Headers show

Comments

Juan Quintela - Dec. 19, 2012, 12:33 p.m.
At this point, it is waranteed that state is ACTIVE.  Old position
didn't assured hat.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/migration.c b/migration.c
index 5a4ad74..cabf17b 100644
--- a/migration.c
+++ b/migration.c
@@ -455,8 +455,6 @@  void qmp_migrate(const char *uri, bool has_blk, bool blk,
         error_propagate(errp, local_err);
         return;
     }
-
-    notifier_list_notify(&migration_state_notifiers, s);
 }

 void qmp_migrate_cancel(Error **errp)
@@ -814,4 +812,5 @@  void migrate_fd_connect(MigrationState *migration_state)

     qemu_thread_create(&s->thread, buffered_file_thread, s,
                        QEMU_THREAD_DETACHED);
+    notifier_list_notify(&migration_state_notifiers, s);
 }