diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-02-21 16:47:51 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-03-13 15:23:37 +0400 |
commit | f5fd677ae7cf7cfb07b12adbfd479c460ddc3ac5 (patch) | |
tree | 20c527712fd1611992b572d4362a41011392349c /util/main-loop.c | |
parent | 3ffef1a55ca3b55fa64d43cd35af5adb2c260463 (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.c | 6 |
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, |