diff options
author | Juan Quintela <quintela@redhat.com> | 2010-05-11 23:38:23 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2011-10-20 13:23:54 +0200 |
commit | 767de722589c1e6e6926a421d1a8e110ad9b059f (patch) | |
tree | 6c96c03618869bdf7054c8064e6a230922f2b55f | |
parent | 48a2f4d6c567275b93f6d6ef7da555ab158b12d4 (diff) |
migration: Remove migration cancel() callback
It is used only in one place
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r-- | migration.c | 9 | ||||
-rw-r--r-- | migration.h | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/migration.c b/migration.c index 8dbe8df109..31b6741c7d 100644 --- a/migration.c +++ b/migration.c @@ -132,12 +132,12 @@ free_migrate_state: return -1; } +static void migrate_fd_cancel(MigrationState *s); + int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data) { - MigrationState *s = current_migration; - - if (s && s->state == MIG_STATE_ACTIVE) { - s->cancel(s); + if (current_migration) { + migrate_fd_cancel(current_migration); } return 0; } @@ -488,7 +488,6 @@ static MigrationState *migrate_new(Monitor *mon, int64_t bandwidth_limit, { MigrationState *s = g_malloc0(sizeof(*s)); - s->cancel = migrate_fd_cancel; s->blk = blk; s->shared = inc; s->mon = NULL; diff --git a/migration.h b/migration.h index 6be3623baf..e1299b9423 100644 --- a/migration.h +++ b/migration.h @@ -38,7 +38,6 @@ struct MigrationState int (*get_error)(MigrationState *s); int (*close)(MigrationState *s); int (*write)(MigrationState *s, const void *buff, size_t size); - void (*cancel)(MigrationState *s); void *opaque; int blk; int shared; |