From f5fd677ae7cf7cfb07b12adbfd479c460ddc3ac5 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Tue, 21 Feb 2023 16:47:51 +0400 Subject: win32/socket: introduce qemu_socket_select() helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-7-marcandre.lureau@redhat.com> --- util/main-loop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/main-loop.c') 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, -- cgit 1.4.1