]> Git Repo - qemu.git/commitdiff
migration: don't "write" when migration is not active
authorJuan Quintela <[email protected]>
Wed, 21 Sep 2011 20:37:29 +0000 (22:37 +0200)
committerJuan Quintela <[email protected]>
Thu, 20 Oct 2011 11:23:51 +0000 (13:23 +0200)
If migration is not active, just ignore writes.

Signed-off-by: Juan Quintela <[email protected]>
migration.c

index f41a40b49179da7352c97e53433acf12bd38b524..260e5b5fc1fb22183b6d21ebb0a0c8c3bd7da141 100644 (file)
@@ -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));
This page took 0.02375 seconds and 4 git commands to generate.