qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] broken socket events on win32 qemu
@ 2016-03-07  7:23 Andrew Baumann
  2016-03-07  8:24 ` Paolo Bonzini
  2016-03-07 10:19 ` Daniel P. Berrange
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Baumann @ 2016-03-07  7:23 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Stefan Weil, QEMU Developers, Paolo Bonzini

Hi Daniel,

This commit ("char: convert from GIOChannel to QIOChannel"):
https://github.com/qemu/qemu/commit/9894dc0cdcc397ee5b26370bc53da6d360a363c2
... appears to have broken socket events for character devices on Win32. For example, I can no longer connect to a GDB stub (started with: "-gdb tcp:127.0.0.1:1234"), since tcp_chr_accept is never called.

Without having looked very closely at the code, I suspect the problem may be that we've lost the special-case treatment of socket handles as distinct from file descriptors on Win32 (they are different namespaces, and different APIs are needed). The previous version of qemu-char.c special-cased sockets in io_channel_from_socket():

-#ifdef _WIN32
-    chan = g_io_channel_win32_new_socket(fd);
-#else
-    chan = g_io_channel_unix_new(fd);
-#endif

... but I don't see anything equivalent in io/channel-socket.c. Am I looking in the wrong place?

BTW, The same change introduces another problem on win32: server sockets like the GDB example above fail on getpeername() with "Unable to query remote socket address: Unknown error". This seems to be caused by a definition of ENOTCONN that is not WSAENOTCONN. I'm still trying to figure out why that is, and how to best fix it.

Regards,
Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-07 18:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07  7:23 [Qemu-devel] broken socket events on win32 qemu Andrew Baumann
2016-03-07  8:24 ` Paolo Bonzini
2016-03-07 10:19 ` Daniel P. Berrange
2016-03-07 12:45   ` Paolo Bonzini
2016-03-07 18:23   ` Andrew Baumann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).