GNOME Bugzilla – Bug 619975
arrays get wrapped in variants in DBus results
Last modified: 2010-06-07 17:43:30 UTC
It appears that gjs is responsible for wrapping arrays in unnecessary variants in DBus results. This happens for ObserverChannelFilter property of the GNOME Shell Telepathy Client that implements the Observer interface. The ObserverChannelsFilter is defined in gnome-shell/js/ui/telepathyClient.js as get ObserverChannelFilter() { return [ singleUserTextChannel, oneOrMoreUserTextChannel ]; }, where, e.g. let singleUserTextChannel = {}; singleUserTextChannel[Telepathy.CHANNEL_NAME + '.ChannelType'] = Telepathy.CHANNEL_TEXT_NAME; singleUserTextChannel[Telepathy.CHANNEL_NAME + '.TargetHandleType'] = Telepathy.HandleType.CONTACT; The signature for the method is defined in gnome-shell/js/misc/telepathy.js as properties: [ { name: 'ObserverChannelFilter', signature: 'aa{sv}', access: 'read' } ] The output of dbus-monitor shows that the extra variants get added into the result: method call sender=:1.126 -> dest=org.freedesktop.Telepathy.Client.GnomeShell serial=577 path=/org/freedesktop/Telepathy/Client/GnomeShell; interface=org.freedesktop.DBus.Properties; member=GetAll string "org.freedesktop.Telepathy.Client.Observer" method return sender=:1.165 -> dest=:1.126 reply_serial=577 array [ dict entry( string "ObserverChannelFilter" variant array [ variant array [ dict entry( string "org.freedesktop.Telepathy.Channel.TargetHandleType" variant int32 1 ) dict entry( string "org.freedesktop.Telepathy.Channel.ChannelType" variant string "org.freedesktop.Telepathy.Channel.Type.Text" ) ] variant array [ dict entry( string "org.freedesktop.Telepathy.Channel.TargetHandleType" variant int32 0 ) dict entry( string "org.freedesktop.Telepathy.Channel.ChannelType" variant string "org.freedesktop.Telepathy.Channel.Type.Text" ) ] ] ) ] Compare this to the format of a similar filter specification from Empathy: method return sender=:1.168 -> dest=:1.126 reply_serial=597 array [ dict entry( string "HandlerChannelFilter" variant array [ array [ dict entry( string "org.freedesktop.Telepathy.Channel.TargetHandleType" variant int32 0 ) dict entry( string "org.freedesktop.Telepathy.Channel.ChannelType" variant string "org.freedesktop.Telepathy.Channel.Type.Text" ) ] array [ dict entry( string "org.freedesktop.Telepathy.Channel.TargetHandleType" variant int32 1 ) dict entry( string "org.freedesktop.Telepathy.Channel.ChannelType" variant string "org.freedesktop.Telepathy.Channel.Type.Text" ) ] ... ] ) ] The way we were specifying the filter did not cause any problems on F12, but it fails on F13 causing us not to get any message notifications, with 'MC_DEBUG=1 /usr/libexec/mission-control-5' indicating: (process:24923): mcd-DEBUG: _mcd_client_proxy_observer_get_all_cb: org.freedesktop.Telepathy.Client.GnomeShell ObserverChannelFilter absent or wrong type, assuming no channels can match
Created attachment 162700 [details] [review] [dbus] Remove additional incorrect variant in GetAll The code in GetAll was giving "v" as the signature to conform individual property values to, and ignoring the specified property signature, which is wrong. Instead, open a variant container, and pass the correct signature when formatting a value.
Thanks! This fixes the problem with the message notifications.
Attachment 162700 [details] pushed as d2c93ad - [dbus] Remove additional incorrect variant in GetAll