}
}
-MigrationState *unix_start_outgoing_migration(const char *path,
+MigrationState *unix_start_outgoing_migration(Monitor *mon,
+ const char *path,
int64_t bandwidth_limit,
int detach,
int blk,
s->mig_state.shared = inc;
s->state = MIG_STATE_ACTIVE;
- s->mon_resume = NULL;
+ s->mon = NULL;
s->bandwidth_limit = bandwidth_limit;
- s->fd = socket(PF_UNIX, SOCK_STREAM, 0);
+ s->fd = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (s->fd < 0) {
dprintf("Unable to open socket");
goto err_after_alloc;
socket_set_nonblock(s->fd);
- if (!detach)
- migrate_fd_monitor_suspend(s);
+ if (!detach) {
+ migrate_fd_monitor_suspend(s, mon);
+ }
do {
ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr));
int c, ret;
do {
- c = accept(s, (struct sockaddr *)&addr, &addrlen);
+ c = qemu_accept(s, (struct sockaddr *)&addr, &addrlen);
} while (c == -1 && socket_error() == EINTR);
dprintf("accepted migration\n");
dprintf("Attempting to start an incoming migration\n");
- sock = socket(PF_UNIX, SOCK_STREAM, 0);
+ sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
fprintf(stderr, "Could not open unix socket: %s\n", strerror(errno));
return -EINVAL;