diff options
author | Juan Quintela <quintela@redhat.com> | 2011-09-21 22:37:29 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2011-10-20 13:23:51 +0200 |
commit | fdbecb5d0e6a1caca5b4a732beb68771eacc7736 (patch) | |
tree | 0acc01f5e7d7ac05974dcbc2fd6e1408c09f56ab /migration.c | |
parent | eff28a5c3b36fdca2a15e9570f67924eecb2db4f (diff) |
migration: don't "write" when migration is not active
If migration is not active, just ignore writes.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/migration.c b/migration.c index f41a40b491..260e5b5fc1 100644 --- a/migration.c +++ b/migration.c @@ -323,6 +323,10 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size) FdMigrationState *s = opaque; ssize_t ret; + if (s->state != MIG_STATE_ACTIVE) { + return -EIO; + } + do { ret = s->write(s, data, size); } while (ret == -1 && ((s->get_error(s)) == EINTR)); |