aboutsummaryrefslogtreecommitdiff
path: root/util/main-loop.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-02-21 16:47:51 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 15:23:37 +0400
commitf5fd677ae7cf7cfb07b12adbfd479c460ddc3ac5 (patch)
tree20c527712fd1611992b572d4362a41011392349c /util/main-loop.c
parent3ffef1a55ca3b55fa64d43cd35af5adb2c260463 (diff)
win32/socket: introduce qemu_socket_select() helper
This is a wrapper for WSAEventSelect, with Error handling. By default, it will produce a warning, so callers don't have to be modified now, and yet we can spot potential mis-use. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-Id: <20230221124802.4103554-7-marcandre.lureau@redhat.com>
Diffstat (limited to 'util/main-loop.c')
-rw-r--r--util/main-loop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/main-loop.c b/util/main-loop.c
index 3c0f525192..16e837fb12 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -416,9 +416,9 @@ void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque)
void qemu_fd_register(int fd)
{
- WSAEventSelect(fd, event_notifier_get_handle(&qemu_aio_context->notifier),
- FD_READ | FD_ACCEPT | FD_CLOSE |
- FD_CONNECT | FD_WRITE | FD_OOB);
+ qemu_socket_select(fd, event_notifier_get_handle(&qemu_aio_context->notifier),
+ FD_READ | FD_ACCEPT | FD_CLOSE |
+ FD_CONNECT | FD_WRITE | FD_OOB, NULL);
}
static int pollfds_fill(GArray *pollfds, fd_set *rfds, fd_set *wfds,