[glib] gioerror: Add more mappings for WinSock error codes



commit 20e8b634771f85926a6f9a67e11f13eb01d45bc7
Author: Sebastian Dröge <sebastian centricular com>
Date:   Fri Sep 4 11:58:57 2015 +0300

    gioerror: Add more mappings for WinSock error codes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754560

 gio/gioerror.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gio/gioerror.c b/gio/gioerror.c
index 0faff25..c069347 100644
--- a/gio/gioerror.c
+++ b/gio/gioerror.c
@@ -301,6 +301,7 @@ g_io_error_from_win32_error (gint error_code)
 
     case WSA_INVALID_HANDLE:
     case WSA_INVALID_PARAMETER:
+    case WSAEINVAL:
     case WSAEBADF:
     case WSAENOTSOCK:
       return G_IO_ERROR_INVALID_ARGUMENT;
@@ -320,6 +321,19 @@ g_io_error_from_win32_error (gint error_code)
     case WSAECONNRESET:
       return G_IO_ERROR_CONNECTION_CLOSED;
 
+    case WSAEHOSTUNREACH:
+      return G_IO_ERROR_HOST_UNREACHABLE;
+
+    case WSAENETUNREACH:
+      return G_IO_ERROR_NETWORK_UNREACHABLE;
+
+    case WSAECONNREFUSED:
+      return G_IO_ERROR_CONNECTION_REFUSED;
+
+    case WSAETIMEDOUT:
+      return G_IO_ERROR_TIMED_OUT;
+
+    case WSAENOTCONN:
     case ERROR_PIPE_LISTENING:
       return G_IO_ERROR_NOT_CONNECTED;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]