Rename g_socket_check_pending_error to g_socket_check_connect_result
authorAlexander Larsson <alexl@redhat.com>
Tue, 19 May 2009 08:57:58 +0000 (10:57 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 19 May 2009 08:57:58 +0000 (10:57 +0200)
This is only used for connect anyway, and this describes the operation
better.

docs/reference/gio/gio-sections.txt
gio/gio.symbols
gio/gsocket.c
gio/gsocket.h
gio/gsocketclient.c

index d4c8962..155a868 100644 (file)
@@ -1638,7 +1638,7 @@ g_socket_bind
 g_socket_listen
 g_socket_accept
 g_socket_connect
-g_socket_check_pending_error
+g_socket_check_connect_result
 g_socket_receive
 g_socket_receive_from
 g_socket_receive_message
index 48561b6..454440b 100644 (file)
@@ -1065,7 +1065,7 @@ g_initable_new_valist
 g_socket_get_type G_GNUC_CONST
 g_socket_accept
 g_socket_bind
-g_socket_check_pending_error
+g_socket_check_connect_result
 g_socket_close
 g_socket_condition_check
 g_socket_condition_wait
index b17f09f..d7e6ea2 100644 (file)
@@ -1472,7 +1472,7 @@ g_socket_accept (GSocket       *socket,
  * 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
  * 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.
  *
@@ -1517,7 +1517,7 @@ g_socket_connect (GSocket         *socket,
              if (socket->priv->blocking)
                {
                  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;
                  else
                    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
  * @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.
  *
  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
@@ -1556,8 +1556,8 @@ g_socket_connect (GSocket         *socket,
  * Since: 2.22
  **/
 gboolean
-g_socket_check_pending_error (GSocket  *socket,
-                             GError  **error)
+g_socket_check_connect_result (GSocket  *socket,
+                              GError  **error)
 {
   guint optlen;
   int value;
index b43167d..207f168 100644 (file)
@@ -106,7 +106,7 @@ gboolean               g_socket_bind                    (GSocket
 gboolean               g_socket_connect                 (GSocket                 *socket,
                                                         GSocketAddress          *address,
                                                         GError                 **error);
-gboolean               g_socket_check_pending_error     (GSocket                 *socket,
+gboolean               g_socket_check_connect_result    (GSocket                 *socket,
                                                         GError                 **error);
 GIOCondition           g_socket_condition_check         (GSocket                 *socket,
                                                         GIOCondition             condition);
index ddb1383..9224793 100644 (file)
@@ -671,7 +671,7 @@ g_socket_client_socket_callback (GSocket *socket,
   else
     {
       /* 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);