From 9e8dd45164af05a5dab00324dd10b037f5bd1e2a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 20 Jun 2011 14:06:26 +0200 Subject: notifier: Pass data argument to callback This allows to pass additional information to the notifier callback which is useful if sender and receiver do not share any other distinct data structure. Will be used first for the clock reset notifier. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- migration.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'migration.c') diff --git a/migration.c b/migration.c index af3a1f2..2a15b98 100644 --- a/migration.c +++ b/migration.c @@ -124,7 +124,7 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) } current_migration = s; - notifier_list_notify(&migration_state_notifiers); + notifier_list_notify(&migration_state_notifiers, NULL); return 0; } @@ -276,7 +276,7 @@ void migrate_fd_error(FdMigrationState *s) { DPRINTF("setting error state\n"); s->state = MIG_STATE_ERROR; - notifier_list_notify(&migration_state_notifiers); + notifier_list_notify(&migration_state_notifiers, NULL); migrate_fd_cleanup(s); } @@ -334,7 +334,7 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size) monitor_resume(s->mon); } s->state = MIG_STATE_ERROR; - notifier_list_notify(&migration_state_notifiers); + notifier_list_notify(&migration_state_notifiers, NULL); } return ret; @@ -395,7 +395,7 @@ void migrate_fd_put_ready(void *opaque) state = MIG_STATE_ERROR; } s->state = state; - notifier_list_notify(&migration_state_notifiers); + notifier_list_notify(&migration_state_notifiers, NULL); } } @@ -415,7 +415,7 @@ void migrate_fd_cancel(MigrationState *mig_state) DPRINTF("cancelling migration\n"); s->state = MIG_STATE_CANCELLED; - notifier_list_notify(&migration_state_notifiers); + notifier_list_notify(&migration_state_notifiers, NULL); qemu_savevm_state_cancel(s->mon, s->file); migrate_fd_cleanup(s); @@ -429,7 +429,7 @@ void migrate_fd_release(MigrationState *mig_state) if (s->state == MIG_STATE_ACTIVE) { s->state = MIG_STATE_CANCELLED; - notifier_list_notify(&migration_state_notifiers); + notifier_list_notify(&migration_state_notifiers, NULL); migrate_fd_cleanup(s); } qemu_free(s); -- cgit v1.1