Skip to content

socket test: Adjust for Windows-specific sendto() error

LRN requested to merge lrn/glib:cherry-pick-b3a55db8 into master

With winsock sending messages to NULL results in G_IO_ERROR_NOT_CONNECTED instead of G_IO_ERROR_FAILED. MSDN says: WSAENOTCONN 10057 Socket is not connected. A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied. So this is a direct mapping of the implementation error. Covering it up in the wrapper (by converting it to G_IO_ERROR_FAILED) doesn't seem feasible or needed (no one, except for the testsuite, really cares which unrecoverable error is returned by sendto()).

(cherry picked from commit b3a55db8f087c326cb15c09802b19950ca18fb1b)

Merge request reports