]> git.proxmox.com Git - qemu.git/commitdiff
Fix brown-paper-bag bugs from live-migration patch (Charles Duffy)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 12 Nov 2008 22:29:11 +0000 (22:29 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 12 Nov 2008 22:29:11 +0000 (22:29 +0000)
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
migration-tcp.c

index 5d0b215fd163e9c086d1ef02e44205c1422e812f..caeed4bbc0eee01493560206db136cd6b53a1575 100644 (file)
@@ -85,6 +85,7 @@ MigrationState *exec_start_outgoing_migration(const char *command,
 
     s->opaque = qemu_popen(f, "w");
 
+    s->close = exec_close;
     s->get_error = file_errno;
     s->write = file_write;
     s->mig_state.cancel = migrate_fd_cancel;
index 100644ba273bccf58d0d1494aaac4c88a887a974..6fc1943d8bc2cbf550874a3dc774e8d5112602cf 100644 (file)
@@ -32,7 +32,7 @@
 
 static int socket_errno(FdMigrationState *s)
 {
-    return (s->get_error(s));
+    return socket_error();
 }
 
 static int socket_write(FdMigrationState *s, const void * buf, size_t size)