Commit 8ad9fa5d8be7fd04e723020088eca664971eb363

Authored by aliguori
1 parent c310de86

Fix brown-paper-bag bugs from live-migration patch (Charles Duffy)

In TCP migration, prevent an endless loop trying to retrieve error status. In
exec migration, set the close pointer in the FdMigrationState structure.

Color me embarrassed.

Signed-off-by: Charles Duffy <charles_duffy@messageone.com> 
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5713 c046a42c-6fe2-441c-8c8c-71466251a162
migration-exec.c
... ... @@ -85,6 +85,7 @@ MigrationState *exec_start_outgoing_migration(const char *command,
85 85  
86 86 s->opaque = qemu_popen(f, "w");
87 87  
  88 + s->close = exec_close;
88 89 s->get_error = file_errno;
89 90 s->write = file_write;
90 91 s->mig_state.cancel = migrate_fd_cancel;
... ...
migration-tcp.c
... ... @@ -32,7 +32,7 @@
32 32  
33 33 static int socket_errno(FdMigrationState *s)
34 34 {
35   - return (s->get_error(s));
  35 + return socket_error();
36 36 }
37 37  
38 38 static int socket_write(FdMigrationState *s, const void * buf, size_t size)
... ...