[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/15] io: use closesocket()
From: |
marcandre . lureau |
Subject: |
[PATCH v2 03/15] io: use closesocket() |
Date: |
Tue, 21 Feb 2023 01:48:47 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Because they are actually sockets...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
io/channel-socket.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/io/channel-socket.c b/io/channel-socket.c
index 7aca84f61a..2040297d2b 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -159,7 +159,7 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc,
trace_qio_channel_socket_connect_complete(ioc, fd);
if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {
- close(fd);
+ closesocket(fd);
return -1;
}
@@ -233,7 +233,7 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc,
trace_qio_channel_socket_listen_complete(ioc, fd);
if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {
- close(fd);
+ closesocket(fd);
return -1;
}
qio_channel_set_feature(QIO_CHANNEL(ioc), QIO_CHANNEL_FEATURE_LISTEN);
@@ -310,7 +310,7 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,
trace_qio_channel_socket_dgram_complete(ioc, fd);
if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {
- close(fd);
+ closesocket(fd);
return -1;
}
--
2.39.1
- [PATCH v2 00/15] win32: do not mix SOCKET and fd space, marcandre . lureau, 2023/02/20
- [PATCH v2 01/15] util: drop qemu_fork(), marcandre . lureau, 2023/02/20
- [PATCH v2 02/15] tests: use closesocket(), marcandre . lureau, 2023/02/20
- [PATCH v2 03/15] io: use closesocket(),
marcandre . lureau <=
- [PATCH v2 04/15] error: add global &error_warn destination, marcandre . lureau, 2023/02/20
- [PATCH v2 07/15] aio: make aio_set_fd_poll() static to aio-posix.c, marcandre . lureau, 2023/02/20
- [PATCH v2 08/15] aio/win32: aio_set_fd_handler() only supports SOCKET, marcandre . lureau, 2023/02/20
- [PATCH v2 10/15] main-loop: remove qemu_fd_register(), win32/slirp/socket specific, marcandre . lureau, 2023/02/20
- [PATCH v2 12/15] slirp: open-code qemu_socket_(un)select(), marcandre . lureau, 2023/02/20
- [PATCH v2 09/15] RFC: build-sys: add slirp.wrap, marcandre . lureau, 2023/02/20
- [PATCH v2 11/15] slirp: unregister the win32 SOCKET, marcandre . lureau, 2023/02/20
- [PATCH v2 14/15] os-posix: remove useless ioctlsocket() define, marcandre . lureau, 2023/02/20
- [PATCH v2 13/15] win32: avoid mixing SOCKET and file descriptor space, marcandre . lureau, 2023/02/20