GNOME Bugzilla – Bug 669915
dconf-dbus support for change notification of multiple values broken
Last modified: 2012-02-12 18:40:39 UTC
When multiple values of a same path are changed in batch using g_settings_delay, notification received using dconf_dbus_client_subscribe have incorrect parameters. Test case attached in the form of a client setting dconf keys using g_settings (broken.c) and a dconf dbus watcher that listens for changes (dbus_watcher.c). To compile them: gcc $(pkg-config --libs --cflags dconf-dbus-1 dconf dbus-glib-1) -o dbus_watcher dbus_watcher.c gcc $(pkg-config --libs --cflags gio-2.0) -o broken broken.c Then run ./dbus_watcher first and run ./broken then. Current console output for dbus_watcher: process 15623: type invalid 0 not a basic type NOTIFY key /org/gnome/desktop/background/XXX process 15623: type invalid 0 not a basic type NOTIFY key /org/gnome/desktop/background/XXX XXX is in fact a unicode character that GNOME's bugzilla won't let me type in. Expected console output for dbus_watcher: NOTIFY key /org/gnome/desktop/background/primary-color NOTIFY key /org/gnome/desktop/background/secondary-color
Created attachment 207370 [details] dbus watcher program
Created attachment 207371 [details] dconf keys setter program
And I found the fix, good day!
Created attachment 207373 [details] [review] Patch fixing the issue
Created attachment 207404 [details] [review] dbus-1: fix change notifications for multiple keys This fixes a rather obvious misuse of the libdbus-1 message decoding API.
Attachment 207404 [details] pushed as ee1e314 - dbus-1: fix change notifications for multiple keys Thanks for the fix.