Bug 37852 - regression in 0.94: marshalling a GObject (as object path) fails
Summary: regression in 0.94: marshalling a GObject (as object path) fails
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://cgit.freedesktop.org/~smcv/dbu...
Whiteboard: review?
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-06-02 05:07 UTC by Simon McVittie
Modified: 2011-06-02 07:08 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
registrations test: only listen for signals, not all messages (1.19 KB, patch)
2011-06-02 05:51 UTC, Simon McVittie
Details | Splinter Review
[PATCH 2/3] Fix regression in marshalling objects as object paths (1.20 KB, patch)
2011-06-02 05:51 UTC, Simon McVittie
Details | Splinter Review
[PATCH 3/3] Regression test for fd.o #37852 (4.86 KB, patch)
2011-06-02 05:52 UTC, Simon McVittie
Details | Splinter Review

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.