After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651327 - Minor fixes for the gsocket API
Minor fixes for the gsocket API
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-05-28 14:22 UTC by Neil Roberts
Modified: 2011-05-28 23:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsocket: Fix the error message for a failed g_socket_shutdown (964 bytes, patch)
2011-05-28 14:23 UTC, Neil Roberts
committed Details | Review
gsocket: Fix some cases of returning error without setting *error (1.08 KB, patch)
2011-05-28 14:23 UTC, Neil Roberts
committed Details | Review
gsocket: Fix some cases of returning error without setting *error (1.08 KB, patch)
2011-05-28 23:47 UTC, Matthias Clasen
committed Details | Review
gsocket: Fix the error message for a failed g_socket_shutdown (967 bytes, patch)
2011-05-28 23:47 UTC, Matthias Clasen
committed Details | Review

Description Neil Roberts 2011-05-28 14:22:55 UTC
Here's a couple of minor fixes for error reporting in the GSocket API.
Comment 1 Neil Roberts 2011-05-28 14:23:34 UTC
Created attachment 188807 [details] [review]
gsocket: Fix the error message for a failed g_socket_shutdown

The GError message for g_socket_shutdown was reporting that it was
"Unable to create socket" which is presumably a cut-and-paste bug.
Comment 2 Neil Roberts 2011-05-28 14:23:37 UTC
Created attachment 188808 [details] [review]
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.
Comment 3 Emmanuele Bassi (:ebassi) 2011-05-28 14:34:24 UTC
Review of attachment 188807 [details] [review]:

looks good
Comment 4 Emmanuele Bassi (:ebassi) 2011-05-28 14:35:43 UTC
Review of attachment 188808 [details] [review]:

seems obviously correct to me, but danw or davidz might want to look at it as well.
Comment 5 Matthias Clasen 2011-05-28 23:36:23 UTC
Review of attachment 188807 [details] [review]:

Good catch
Comment 6 Matthias Clasen 2011-05-28 23:46:49 UTC
The following fixes have been pushed:
2df4750 gsocket: Fix some cases of returning error without setting *error
0703dbc gsocket: Fix the error message for a failed g_socket_shutdown
Comment 7 Matthias Clasen 2011-05-28 23:47:13 UTC
Created attachment 188820 [details] [review]
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.
Comment 8 Matthias Clasen 2011-05-28 23:47:21 UTC
Created attachment 188821 [details] [review]
gsocket: Fix the error message for a failed g_socket_shutdown

The GError message for g_socket_shutdown was reporting that it was
"Unable to create socket" which is presumably a cut-and-paste bug.