mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-21 21:12:11 +02:00
Rename g_socket_check_pending_error to g_socket_check_connect_result
This is only used for connect anyway, and this describes the operation better.
This commit is contained in:
parent
bcba61c951
commit
e1a4389cbc
@ -1638,7 +1638,7 @@ g_socket_bind
|
|||||||
g_socket_listen
|
g_socket_listen
|
||||||
g_socket_accept
|
g_socket_accept
|
||||||
g_socket_connect
|
g_socket_connect
|
||||||
g_socket_check_pending_error
|
g_socket_check_connect_result
|
||||||
g_socket_receive
|
g_socket_receive
|
||||||
g_socket_receive_from
|
g_socket_receive_from
|
||||||
g_socket_receive_message
|
g_socket_receive_message
|
||||||
|
@ -1065,7 +1065,7 @@ g_initable_new_valist
|
|||||||
g_socket_get_type G_GNUC_CONST
|
g_socket_get_type G_GNUC_CONST
|
||||||
g_socket_accept
|
g_socket_accept
|
||||||
g_socket_bind
|
g_socket_bind
|
||||||
g_socket_check_pending_error
|
g_socket_check_connect_result
|
||||||
g_socket_close
|
g_socket_close
|
||||||
g_socket_condition_check
|
g_socket_condition_check
|
||||||
g_socket_condition_wait
|
g_socket_condition_wait
|
||||||
|
@ -1472,7 +1472,7 @@ g_socket_accept (GSocket *socket,
|
|||||||
* non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
|
* non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
|
||||||
* and the user can be notified of the connection finishing by waiting
|
* and the user can be notified of the connection finishing by waiting
|
||||||
* for the G_IO_OUT condition. The result of the connection can then be
|
* for the G_IO_OUT condition. The result of the connection can then be
|
||||||
* checked with g_socket_check_pending_error().
|
* checked with g_socket_check_connect_result().
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if connected, %FALSE on error.
|
* Returns: %TRUE if connected, %FALSE on error.
|
||||||
*
|
*
|
||||||
@ -1517,7 +1517,7 @@ g_socket_connect (GSocket *socket,
|
|||||||
if (socket->priv->blocking)
|
if (socket->priv->blocking)
|
||||||
{
|
{
|
||||||
g_socket_condition_wait (socket, G_IO_OUT, NULL, NULL);
|
g_socket_condition_wait (socket, G_IO_OUT, NULL, NULL);
|
||||||
if (g_socket_check_pending_error (socket, error))
|
if (g_socket_check_connect_result (socket, error))
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
g_prefix_error (error, _("Error connecting: "));
|
g_prefix_error (error, _("Error connecting: "));
|
||||||
@ -1544,11 +1544,11 @@ g_socket_connect (GSocket *socket,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_socket_check_pending_error:
|
* g_socket_check_connect_result:
|
||||||
* @socket: a #GSocket
|
* @socket: a #GSocket
|
||||||
* @error: #GError for error reporting, or %NULL to ignore.
|
* @error: #GError for error reporting, or %NULL to ignore.
|
||||||
*
|
*
|
||||||
* Checks and resets the pending error for the socket. This is typically
|
* Checks and resets the pending connect error for the socket. This is
|
||||||
* used to check for errors when g_socket_connect() is used in non-blocking mode.
|
* used to check for errors when g_socket_connect() is used in non-blocking mode.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
|
* Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
|
||||||
@ -1556,8 +1556,8 @@ g_socket_connect (GSocket *socket,
|
|||||||
* Since: 2.22
|
* Since: 2.22
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_socket_check_pending_error (GSocket *socket,
|
g_socket_check_connect_result (GSocket *socket,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
guint optlen;
|
guint optlen;
|
||||||
int value;
|
int value;
|
||||||
|
@ -106,7 +106,7 @@ gboolean g_socket_bind (GSocket
|
|||||||
gboolean g_socket_connect (GSocket *socket,
|
gboolean g_socket_connect (GSocket *socket,
|
||||||
GSocketAddress *address,
|
GSocketAddress *address,
|
||||||
GError **error);
|
GError **error);
|
||||||
gboolean g_socket_check_pending_error (GSocket *socket,
|
gboolean g_socket_check_connect_result (GSocket *socket,
|
||||||
GError **error);
|
GError **error);
|
||||||
GIOCondition g_socket_condition_check (GSocket *socket,
|
GIOCondition g_socket_condition_check (GSocket *socket,
|
||||||
GIOCondition condition);
|
GIOCondition condition);
|
||||||
|
@ -671,7 +671,7 @@ g_socket_client_socket_callback (GSocket *socket,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* socket is ready for writing means connect done, did it succeed? */
|
/* socket is ready for writing means connect done, did it succeed? */
|
||||||
if (!g_socket_check_pending_error (data->current_socket, &error))
|
if (!g_socket_check_connect_result (data->current_socket, &error))
|
||||||
{
|
{
|
||||||
set_last_error (data, error);
|
set_last_error (data, error);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user