After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723422 - Fix g_socket_get_available() with TCP on Windows
Fix g_socket_get_available() with TCP on Windows
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-02-01 14:22 UTC by Dan Winship
Modified: 2014-02-15 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix g_socket_get_available() with TCP on Windows (7.42 KB, patch)
2014-02-01 14:22 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2014-02-01 14:22:02 UTC
(Note that the changes here are general code logic, not anything
Windows-specific, so this doesn't need a Windows-clueful reviewer.)
Comment 1 Dan Winship 2014-02-01 14:22:04 UTC
Created attachment 267786 [details] [review]
Fix g_socket_get_available() with TCP on Windows

Windows needs a special inefficient hack to implement
g_socket_get_available() correctly for UDP sockets, but that hack
isn't needed for TCP, and in fact, might give the wrong answer in that
case. Fix it to only use the hack with UDP.

Also, fix that case to handle non-blocking sockets as well.

And add a test case for g_socket_get_available() with TCP.
Comment 2 Dan Winship 2014-02-15 15:08:31 UTC
Attachment 267786 [details] pushed as 074df39 - Fix g_socket_get_available() with TCP on Windows