Bug 37852

Summary: regression in 0.94: marshalling a GObject (as object path) fails
Product: dbus Reporter: Simon McVittie <smcv>
Component: GLibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: cosimo.alfarano, rob.taylor, smcv, will
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/~smcv/dbus-glib/log/?h=marshal-gobject-37852
Whiteboard: review?
i915 platform: i915 features:
Attachments: registrations test: only listen for signals, not all messages
[PATCH 2/3] Fix regression in marshalling objects as object paths
[PATCH 3/3] Regression test for fd.o #37852

Description Simon McVittie 2011-06-02 05:07:02 UTC
> const char *
> _dbus_gobject_get_path (GObject *obj)
> {
>   GSList *registrations;
>   ObjectRegistration *o;
> 
>   registrations = g_object_get_data (obj, "dbus_glib_object_registrations");

but dbus_glib_object_registrations is now an ObjectExport struct, not a GSList, in order to fix Bug #36811.

This breaks marshalling a GObject (as its object path), which NetworkManager uses.

Bug-Debian: <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628890>
Comment 1 Simon McVittie 2011-06-02 05:51:29 UTC
Created attachment 47453 [details] [review]
registrations test: only listen for signals, not all messages

Otherwise, we'd reply with an error to messages not intended for us.
Comment 2 Simon McVittie 2011-06-02 05:51:48 UTC
Created attachment 47454 [details] [review]
[PATCH 2/3] Fix regression in marshalling objects as object paths

This regressed while fixing fd.o #36811. NetworkManager apparently uses
this idiom.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37852
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628890
Comment 3 Simon McVittie 2011-06-02 05:52:03 UTC
Created attachment 47455 [details] [review]
[PATCH 3/3] Regression test for fd.o #37852
Comment 4 Simon McVittie 2011-06-02 06:25:34 UTC
Tested-by: Michael Biebl <biebl@debian.org>
Comment 5 Colin Walters 2011-06-02 06:39:33 UTC
Comment on attachment 47453 [details] [review]
registrations test: only listen for signals, not all messages

I'm uncertain why this test is calling _add_match manually, but anyways; the patch looks correct.
Comment 6 Colin Walters 2011-06-02 06:41:14 UTC
Comment on attachment 47454 [details] [review]
[PATCH 2/3] Fix regression in marshalling objects as object paths

Looks good.
Comment 7 Colin Walters 2011-06-02 06:46:49 UTC
Comment on attachment 47455 [details] [review]
[PATCH 3/3] Regression test for fd.o #37852

Very minor, but why is it G_SIGNAL_DETAILED?

Otherwise looks good.
Comment 8 Simon McVittie 2011-06-02 07:08:07 UTC
Fixed in git for 0.96

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.