[glib: 1/2] GIO: Convert ENOTSOCK to G_IO_ERROR_INVALID_ARGUMENT
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] GIO: Convert ENOTSOCK to G_IO_ERROR_INVALID_ARGUMENT
- Date: Tue, 19 Mar 2019 09:03:31 +0000 (UTC)
commit 5df0337f5291aa0e9574e4930ba5d424c25e24b2
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sat Mar 16 15:58:16 2019 +0000
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.
gio/gioerror.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gio/gioerror.c b/gio/gioerror.c
index 900553e98..1ec120d98 100644
--- a/gio/gioerror.c
+++ b/gio/gioerror.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]