[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/12] migration: use closesocket, not close
From: |
Orit Wasserman |
Subject: |
Re: [Qemu-devel] [PATCH 07/12] migration: use closesocket, not close |
Date: |
Sun, 28 Oct 2012 11:49:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
On 10/18/2012 12:22 PM, Paolo Bonzini wrote:
> Windows requires this. Migration does not quite work under Windows
> but let's be uniform across QEMU.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> migration-tcp.c | 6 +++---
> 1 file modificato, 3 inserzioni(+), 3 rimozioni(-)
>
> diff --git a/migration-tcp.c b/migration-tcp.c
> index 1bd8481..e797d23 100644
> --- a/migration-tcp.c
> +++ b/migration-tcp.c
> @@ -45,7 +45,7 @@ static int tcp_close(MigrationState *s)
> int r = 0;
> DPRINTF("tcp_close\n");
> if (s->fd != -1) {
> - if (close(s->fd) < 0) {
> + if (closesocket(s->fd) < 0) {
> r = -errno;
> }
> s->fd = -1;
> @@ -97,7 +97,7 @@ static void tcp_accept_incoming_migration(void *opaque)
> c = qemu_accept(s, (struct sockaddr *)&addr, &addrlen);
> } while (c == -1 && socket_error() == EINTR);
> qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
> - close(s);
> + closesocket(s);
>
> DPRINTF("accepted migration\n");
>
> @@ -115,7 +115,7 @@ static void tcp_accept_incoming_migration(void *opaque)
> process_incoming_migration(f);
> qemu_fclose(f);
> out:
> - close(c);
> + closesocket(c);
> }
>
> int tcp_start_incoming_migration(const char *host_port, Error **errp)
>
Reviewed-by: Orit Wasserman <address@hidden>
- [Qemu-devel] [PATCH 03/12] migration: add qemu_get_fd, (continued)
- [Qemu-devel] [PATCH 03/12] migration: add qemu_get_fd, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 06/12] migration: use migrate_fd_close in migrate_fd_cleanup, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 09/12] migration: close socket QEMUFile from socket_close, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 07/12] migration: use closesocket, not close, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 08/12] migration: xxx_close will only be called once, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 10/12] migration: move qemu_fclose to process_incoming_migration, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 11/12] migration: handle EAGAIN while reading QEMUFile, Paolo Bonzini, 2012/10/18
- [Qemu-devel] [PATCH 12/12] migration: move process_incoming_migration to a coroutine, Paolo Bonzini, 2012/10/18