gsocket: Fix some cases of returning error without setting *error

g_socket_shutdown and g_socket_close were calling check_socket with a
NULL error parameter so any errors wouldn't get propagated up.

https://bugzilla.gnome.org/show_bug.cgi?id=651327
This commit is contained in:
Neil Roberts 2011-05-28 15:13:11 +01:00 committed by Matthias Clasen
parent 0703dbc21f
commit 2df4750ace

View File

@ -2109,7 +2109,7 @@ g_socket_shutdown (GSocket *socket,
g_return_val_if_fail (G_IS_SOCKET (socket), TRUE);
if (!check_socket (socket, NULL))
if (!check_socket (socket, error))
return FALSE;
/* Do nothing? */
@ -2196,7 +2196,7 @@ g_socket_close (GSocket *socket,
if (socket->priv->closed)
return TRUE; /* Multiple close not an error */
if (!check_socket (socket, NULL))
if (!check_socket (socket, error))
return FALSE;
while (1)