[systemd-commits] 2 commits - src/libsystemd src/libsystemd-terminal src/locale

David Herrmann dvdhrm at kemper.freedesktop.org
Thu Aug 28 06:26:16 PDT 2014


 src/libsystemd-terminal/idev-keyboard.c |   15 +++++++++++----
 src/libsystemd/sd-bus/bus-util.c        |    3 ---
 src/locale/localed.c                    |    2 +-
 3 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit 427c71629ea375e4ca1841a55902b40de21f2ab4
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Aug 28 15:24:00 2014 +0200

    bus: don't skip interfaces in bus_message_map_properties_changed()
    
    Skipping interfaces randomly without the caller specifying it is nasty.
    Avoid this and let the caller do that themselves.

diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
index 03f54bb..ab9e481 100644
--- a/src/libsystemd-terminal/idev-keyboard.c
+++ b/src/libsystemd-terminal/idev-keyboard.c
@@ -317,11 +317,14 @@ static int kbdctx_locale_props_changed_fn(sd_bus *bus,
 
         kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
 
+        /* skip interface name */
+        r = sd_bus_message_skip(signal, "s");
+        if (r < 0)
+                goto error;
+
         r = bus_message_map_properties_changed(bus, signal, kbdctx_locale_map, kc);
-        if (r < 0) {
-                log_debug("idev-keyboard: cannot handle PropertiesChanged from locale1: %s", strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                goto error;
 
         if (r > 0) {
                 r = kbdctx_query_locale(kc);
@@ -331,6 +334,10 @@ static int kbdctx_locale_props_changed_fn(sd_bus *bus,
 
         kbdctx_refresh_keymap(kc);
         return 0;
+
+error:
+        log_debug("idev-keyboard: cannot handle PropertiesChanged from locale1: %s", strerror(-r));
+        return r;
 }
 
 static int kbdctx_setup_bus(kbdctx *kc) {
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index aed3889..a85d361 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -1051,9 +1051,6 @@ int bus_message_map_properties_changed(sd_bus *bus,
         assert(m);
         assert(map);
 
-        /* skip interface, but allow callers to do that themselves */
-        sd_bus_message_skip(m, "s");
-
         r = bus_message_map_all_properties(bus, m, map, userdata);
         if (r < 0)
                 return r;

commit c168eb6785bacc2042687bf879259dfc27d5a523
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Aug 28 15:22:26 2014 +0200

    locale: fix sending PropertiesChanged for x11 keymap changed
    
    The sd_bus_emit_properties_changed() call for x11 keymap changes lacks
    commas.. whoops. Fix it! Now localed emits PropertiesChanged signals
    again.

diff --git a/src/locale/localed.c b/src/locale/localed.c
index 508a000..4d22568 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -1046,7 +1046,7 @@ static int method_set_x11_keyboard(sd_bus *bus, sd_bus_message *m, void *userdat
                 sd_bus_emit_properties_changed(bus,
                                 "/org/freedesktop/locale1",
                                 "org.freedesktop.locale1",
-                                "X11Layout" "X11Model" "X11Variant" "X11Options", NULL);
+                                "X11Layout", "X11Model", "X11Variant", "X11Options", NULL);
 
                 if (convert) {
                         r = x11_convert_to_vconsole(c, bus);



More information about the systemd-commits mailing list