gio: Add G_IO_ERROR_MESSAGE_TOO_LARGE

Corresponding to EMSGSIZE, for when UDP datagrams are rejected due to
being too big.

https://bugzilla.gnome.org/show_bug.cgi?id=752240
This commit is contained in:
Olivier Crête
2015-07-02 11:32:34 +01:00
committed by Philip Withnall
parent 1086507e75
commit be732677f5
2 changed files with 12 additions and 1 deletions

View File

@@ -254,6 +254,12 @@ g_io_error_from_errno (gint err_no)
break;
#endif
#ifdef EMSGSIZE
case EMSGSIZE:
return G_IO_ERROR_MESSAGE_TOO_LARGE;
break;
#endif
default:
return G_IO_ERROR_FAILED;
break;
@@ -337,6 +343,9 @@ g_io_error_from_win32_error (gint error_code)
case ERROR_PIPE_LISTENING:
return G_IO_ERROR_NOT_CONNECTED;
case WSAEMSGSIZE:
return G_IO_ERROR_MESSAGE_TOO_LARGE;
default:
return G_IO_ERROR_FAILED;
}