mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Fixing g_socket_send_message() documentation to make it clearer
This commit is contained in:
parent
af0a555d27
commit
7e00091b60
@ -4754,9 +4754,9 @@ input_message_from_msghdr (const struct msghdr *msg,
|
||||
* notified of a %G_IO_OUT condition. (On Windows in particular, this is
|
||||
* very common due to the way the underlying APIs work.)
|
||||
*
|
||||
* Finally, it must be mentioned that the whole message buffer cannot
|
||||
* exceed %G_MAXSSIZE, if the message can be more than this, then it
|
||||
* is mandatory to use the g_socket_send_message_with_timeout()
|
||||
* The sum of the sizes of each #GOutputVector in vectors must not be
|
||||
* greater than %G_MAXSSIZE. If the message can be larger than this,
|
||||
* then it is mandatory to use the g_socket_send_message_with_timeout()
|
||||
* function.
|
||||
*
|
||||
* On error -1 is returned and @error is set accordingly.
|
||||
@ -4788,18 +4788,19 @@ g_socket_send_message (GSocket *socket,
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
|
||||
_("Unable to send message: %s"),
|
||||
_("Message too large"));
|
||||
_("Message vectors too large"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
vectors_size += vectors[i].size;
|
||||
}
|
||||
/* Check if vectors buffers are too big for gssize */
|
||||
|
||||
/* Check if vector's buffers are too big for gssize */
|
||||
if (vectors_size > G_MAXSSIZE)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
|
||||
_("Unable to send message: %s"),
|
||||
_("Message too large"));
|
||||
_("Message vectors too large"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user