mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
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.
This commit is contained in:
parent
e5ba5845a1
commit
5df0337f52
@ -272,6 +272,12 @@ g_io_error_from_errno (gint err_no)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENOTSOCK
|
||||||
|
case ENOTSOCK:
|
||||||
|
return G_IO_ERROR_INVALID_ARGUMENT;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return G_IO_ERROR_FAILED;
|
return G_IO_ERROR_FAILED;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user