Commit 5df0337f authored by LRN's avatar LRN

GIO: Convert ENOTSOCK to G_IO_ERROR_INVALID_ARGUMENT

instead of using a generic G_IO_ERROR_FAILED error code.
This is in line with what W32 part of the code is doing with WSAENOTSOCK.

This fix will break two tests in libsoup, which were written following
the implementation and thus expect G_IO_ERROR_FAILED when attempting to
do stuff with no-longer-valid socket descriptors.
parent e5ba5845
......@@ -272,6 +272,12 @@ g_io_error_from_errno (gint err_no)
break;
#endif
#ifdef ENOTSOCK
case ENOTSOCK:
return G_IO_ERROR_INVALID_ARGUMENT;
break;
#endif
default:
return G_IO_ERROR_FAILED;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment