OSDN Git Service

slirp: unregister the win32 SOCKET
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 21 Feb 2023 12:47:57 +0000 (16:47 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 13 Mar 2023 11:39:31 +0000 (15:39 +0400)
Presumably, this is what should happen when the SOCKET is to be removed.
(it probably worked until now because closesocket() does it implicitly,
but we never now how the slirp library could use the SOCKET later)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20230221124802.4103554-13-marcandre.lureau@redhat.com>

net/slirp.c

index 0730a93..a7c3577 100644 (file)
@@ -259,7 +259,9 @@ static void net_slirp_register_poll_fd(int fd, void *opaque)
 
 static void net_slirp_unregister_poll_fd(int fd, void *opaque)
 {
-    /* no qemu_fd_unregister */
+#ifdef WIN32
+    qemu_socket_unselect(fd, NULL);
+#endif
 }
 
 static void net_slirp_notify(void *opaque)