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 655656 - uses type 's' for object paths
uses type 's' for object paths
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-30 21:01 UTC by Christian Persch
Modified: 2011-09-02 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.12 KB, patch)
2011-07-30 21:12 UTC, Christian Persch
none Details | Review

Description Christian Persch 2011-07-30 21:01:06 UTC
org.gnome.GConf.Server.GetDatabase and .GetDefaultDatabase return "(s)" but that string is actually used as a dbus object path, and thus should be "(o)".
Comment 1 Christian Persch 2011-07-30 21:12:41 UTC
Created attachment 192925 [details] [review]
patch
Comment 2 Rob Bradford 2011-08-14 15:33:01 UTC
Christian, what i'm concerned about is that this change will break the experience for people who have an older gconf daemon and then use client using a newer version of the library at it.

We could mitigate this by checking the signature on the message.
Comment 3 Christian Persch 2011-08-14 17:21:58 UTC
I guess you're concerned about gconfd on devices which shipped this dbus-enabled gconfd long before it was merged upstream, right?

I think if this is the case, we could just keep using "s" here but add a check that the string actually is an object path.

(I ran into this while porting libgconf to gdbus again, and just wanted to raise the issue.)
Comment 4 Rob Bradford 2011-08-15 07:53:29 UTC
I was thinking of the desktop case with some components built from jhbuild. e.g. old gconfd with newer client. One simple way to give some transition is to switch the server to return an object path and then in the client code check the signature.

Now, since this change would be API change, do you think we should try and get it into GNOME 3.1.5 - if so need to spin a 3.1.5.1 given I did 3.1.5 yesterday ;-)
Comment 5 Rob Bradford 2011-08-15 14:35:09 UTC
Landed!

commit 38f1973d58c65639fe83de7918b5c765933302cd
Author: Rob Bradford <rob@linux.intel.com>
Date:   Mon Aug 15 15:24:27 2011 +0100

    gconf-dbus: Support older daemon returning string for object path
    
    Enhances: https://bugzilla.gnome.org/show_bug.cgi?id=655656

commit 6736f42ce5172b44083a9089ff4a777ed1c5bdc3
Author: Christian Persch <chpe@gnome.org>
Date:   Sat Jul 30 23:06:53 2011 +0200

    gconf(d)-dbus: Use correct type, 'o', for object paths
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=655656
Comment 6 Christian Persch 2011-08-15 14:51:51 UTC
Thanks! I discovered that there's another place that needs the same treatment, the "Notify" signal:

--- a/gconf/gconf-database-dbus.c
+++ b/gconf/gconf-database-dbus.c
@@ -929,7 +929,7 @@ gconf_database_dbus_notify_listeners (GConfDatabase    *db,
                                                      "Notify");
 
              dbus_message_append_args (message,
-                                       DBUS_TYPE_STRING, &db->object_path,
+                                       DBUS_TYPE_OBJECT_PATH, &db->object_path,
                                        DBUS_TYPE_STRING, &dir,
Comment 7 Rob Bradford 2011-08-15 15:16:10 UTC
What about the other side:

I think it's handle_notify: "dbus_message_iter_get_basic (&iter, &db);" reading the source makes me think we don't need to change anything...(it treats an object path as a string in dbus_message_iter_get_basic)
Comment 8 Christian Persch 2011-08-15 15:41:54 UTC
Yes, only the emission needs to change to an object path, the listening side appears to be able to cope without code change.
Comment 9 Rob Bradford 2011-08-15 17:14:20 UTC
commit d6f22138dc0362c706f7958bc3f42aef7af02d46
Author: Christian Persch <chpe@gnome.org>
Date:   Mon Aug 15 16:45:23 2011 +0100

    gconf-database-dbus: Fix notify listeners to also use an object path
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=655656
Comment 10 André Klapper 2011-09-02 13:39:24 UTC
Committd patches *might* have created some problems, *if* the reporter in bug 656867 is correct.