aboutsummaryrefslogtreecommitdiff
path: root/migration-tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration-tcp.c')
-rw-r--r--migration-tcp.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index 7f67fd9..d9c4c98 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -16,7 +16,6 @@
#include "migration.h"
#include "qemu-char.h"
#include "sysemu.h"
-#include "monitor.h"
#include "buffered_file.h"
#include "block.h"
@@ -79,7 +78,7 @@ static void tcp_wait_for_connect(void *opaque)
MigrationState *tcp_start_outgoing_migration(const char *host_port,
int64_t bandwidth_limit,
- int async)
+ int detach)
{
struct sockaddr_in addr;
FdMigrationState *s;
@@ -98,7 +97,7 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port,
s->mig_state.release = migrate_fd_release;
s->state = MIG_STATE_ACTIVE;
- s->detach = !async;
+ s->mon_resume = NULL;
s->bandwidth_limit = bandwidth_limit;
s->fd = socket(PF_INET, SOCK_STREAM, 0);
if (s->fd == -1) {
@@ -108,11 +107,8 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port,
socket_set_nonblock(s->fd);
- if (s->detach == 1) {
- dprintf("detaching from monitor\n");
- monitor_suspend(cur_mon);
- s->detach = 2;
- }
+ if (!detach)
+ migrate_fd_monitor_suspend(s);
do {
ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr));