[glib] gio: add G_IO_ERROR_NOT_CONNECTED
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: add G_IO_ERROR_NOT_CONNECTED
- Date: Tue, 2 Dec 2014 13:23:35 +0000 (UTC)
commit fbfc23453ddbbf8fc44984c78910c4e8c23ef847
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Dec 2 13:50:51 2014 +0100
gio: add G_IO_ERROR_NOT_CONNECTED
It adds a new error G_IO_ERROR_NOT_CONNECTED
and makes the win32 error ERROR_PIPE_LISTENING
to be translated to it.
https://bugzilla.gnome.org/show_bug.cgi?id=741016
gio/gioenums.h | 2 ++
gio/gioerror.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gio/gioenums.h b/gio/gioenums.h
index 90cc9dd..8ebdb2f 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -475,6 +475,7 @@ typedef enum {
* "connection closed" errors returned %G_IO_ERROR_BROKEN_PIPE, but others
* returned %G_IO_ERROR_FAILED. Now they should all return the same
* value, which has this more logical name. Since 2.44.
+ * @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44
*
* Error codes returned by GIO functions.
*
@@ -539,6 +540,7 @@ typedef enum {
G_IO_ERROR_PROXY_NOT_ALLOWED,
G_IO_ERROR_BROKEN_PIPE,
G_IO_ERROR_CONNECTION_CLOSED = G_IO_ERROR_BROKEN_PIPE
+ G_IO_ERROR_NOT_CONNECTED
} GIOErrorEnum;
diff --git a/gio/gioerror.c b/gio/gioerror.c
index 52c9b72..4ec53e8 100644
--- a/gio/gioerror.c
+++ b/gio/gioerror.c
@@ -314,6 +314,9 @@ g_io_error_from_win32_error (gint error_code)
case WSAECONNRESET:
return G_IO_ERROR_CONNECTION_CLOSED;
+ case ERROR_PIPE_LISTENING:
+ return G_IO_ERROR_NOT_CONNECTED;
+
default:
return G_IO_ERROR_FAILED;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]