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 698686 - GUnixSocketAddress: fix construct parameter issue
GUnixSocketAddress: fix construct parameter issue
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 698056
 
 
Reported: 2013-04-23 17:53 UTC by Allison Karlitskaya (desrt)
Modified: 2013-04-23 18:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GUnixSocketAddress: fix construct parameter issue (2.56 KB, patch)
2013-04-23 17:53 UTC, Allison Karlitskaya (desrt)
committed Details | Review
Test GUnixSocketAddress construction (4.25 KB, patch)
2013-04-23 18:33 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2013-04-23 17:53:50 UTC
See patch.
Comment 1 Allison Karlitskaya (desrt) 2013-04-23 17:53:52 UTC
Created attachment 242275 [details] [review]
GUnixSocketAddress: fix construct parameter issue

GUnixSocketAddress has some very strange logic for interpreting its
construct paramters.  This logic behaves differently in these two cases:

  g_object_new (G_TYPE_UNIX_SOCKET_ADDRESS,
                "abstract", FALSE,
                "address-type", ...,
                NULL);

and

  g_object_new (G_TYPE_UNIX_SOCKET_ADDRESS,
                "address-type", ...,
                NULL);

even though the default value for "abstract" is already FALSE.

Change the way the code works so that it is not sensitive to people
merely setting a property to its default value.
Comment 2 Dan Winship 2013-04-23 17:56:37 UTC
Comment on attachment 242275 [details] [review]
GUnixSocketAddress: fix construct parameter issue

ok, though a test would be nice
Comment 3 Allison Karlitskaya (desrt) 2013-04-23 18:33:43 UTC
Created attachment 242278 [details] [review]
Test GUnixSocketAddress construction

This test fails without the previous fix and works properly with it.
Comment 4 Allison Karlitskaya (desrt) 2013-04-23 18:36:30 UTC
Attachment 242275 [details] pushed as 9c243be - GUnixSocketAddress: fix construct parameter issue
Attachment 242278 [details] pushed as c91af2a - Test GUnixSocketAddress construction