mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-25 21:46:14 +01:00
gio: Add G_IO_ERROR_DESTINATION_UNSET
...and map EDESTADDRREQ to it. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This commit is contained in:
parent
734f8184e8
commit
6b7b211338
@ -517,6 +517,7 @@ typedef enum {
|
|||||||
* @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44
|
* @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44
|
||||||
* @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48.
|
* @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48.
|
||||||
* @G_IO_ERROR_NO_SUCH_DEVICE: No such device found. Since 2.74
|
* @G_IO_ERROR_NO_SUCH_DEVICE: No such device found. Since 2.74
|
||||||
|
* @G_IO_ERROR_DESTINATION_UNSET: Destination address unset. Since 2.80
|
||||||
*
|
*
|
||||||
* Error codes returned by GIO functions.
|
* Error codes returned by GIO functions.
|
||||||
*
|
*
|
||||||
@ -587,6 +588,7 @@ typedef enum {
|
|||||||
G_IO_ERROR_NOT_CONNECTED,
|
G_IO_ERROR_NOT_CONNECTED,
|
||||||
G_IO_ERROR_MESSAGE_TOO_LARGE,
|
G_IO_ERROR_MESSAGE_TOO_LARGE,
|
||||||
G_IO_ERROR_NO_SUCH_DEVICE GIO_AVAILABLE_ENUMERATOR_IN_2_74,
|
G_IO_ERROR_NO_SUCH_DEVICE GIO_AVAILABLE_ENUMERATOR_IN_2_74,
|
||||||
|
G_IO_ERROR_DESTINATION_UNSET GIO_AVAILABLE_ENUMERATOR_IN_2_80,
|
||||||
} GIOErrorEnum;
|
} GIOErrorEnum;
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,6 +228,12 @@ g_io_error_from_errno (gint err_no)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef EDESTADDRREQ
|
||||||
|
case EDESTADDRREQ:
|
||||||
|
return G_IO_ERROR_DESTINATION_UNSET;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EMSGSIZE
|
#ifdef EMSGSIZE
|
||||||
case EMSGSIZE:
|
case EMSGSIZE:
|
||||||
return G_IO_ERROR_MESSAGE_TOO_LARGE;
|
return G_IO_ERROR_MESSAGE_TOO_LARGE;
|
||||||
|
@ -557,7 +557,7 @@ test_error_from_errno (void)
|
|||||||
|
|
||||||
#ifdef EDESTADDRREQ
|
#ifdef EDESTADDRREQ
|
||||||
g_assert_cmpuint (g_io_error_from_errno (EDESTADDRREQ), ==,
|
g_assert_cmpuint (g_io_error_from_errno (EDESTADDRREQ), ==,
|
||||||
G_IO_ERROR_FAILED);
|
G_IO_ERROR_DESTINATION_UNSET);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EPROTOTYPE
|
#ifdef EPROTOTYPE
|
||||||
|
@ -777,7 +777,7 @@ test_ip_sync_dgram (GSocketFamily family)
|
|||||||
len = g_socket_send_messages (client, m, G_N_ELEMENTS (m), 0, NULL, &error);
|
len = g_socket_send_messages (client, m, G_N_ELEMENTS (m), 0, NULL, &error);
|
||||||
/* This error code may vary between platforms and over time; it is not guaranteed API: */
|
/* This error code may vary between platforms and over time; it is not guaranteed API: */
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED);
|
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_DESTINATION_UNSET);
|
||||||
#else
|
#else
|
||||||
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_CONNECTED);
|
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_CONNECTED);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user