Patchwork [19/30] migration: move migration notifier

login
register
mail settings
Submitter Juan Quintela
Date Oct. 18, 2012, 7:30 a.m.
Message ID <1350545426-23172-20-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/192223/
State New
Headers show

Comments

Juan Quintela - Oct. 18, 2012, 7:30 a.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 1f783e1..65f96b7 100644
--- a/migration.c
+++ b/migration.c
@@ -432,8 +432,6 @@  void qmp_migrate(const char *uri, bool has_blk, bool blk,
         }
         return;
     }
-
-    notifier_list_notify(&migration_state_notifiers, s);
 }

 void qmp_migrate_cancel(Error **errp)
@@ -779,4 +777,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);
 }