[systemd-devel] [PATCH] core: fix Unit.SetProperties argument parsing

David Herrmann dh.herrmann at gmail.com
Mon Dec 2 14:26:55 PST 2013


SetProperties has signature "ba(sv)", but the bus_unit_set_properties()
helper already does a enter_container('a', "sv") so we have to skip it in
bus_unit_method_set_properties().
---
Heyho

I just stumbled over this. Don't have any test-case and it's too late here to be
 100% sure about bus argument parsing.. Maybe someone can review that?

Thanks
David

 src/core/dbus-unit.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 1fec0e3..e95a529 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -480,18 +480,10 @@ int bus_unit_method_set_properties(sd_bus *bus, sd_bus_message *message, void *u
         if (r < 0)
                 return r;
 
-        r = sd_bus_message_enter_container(message, 'a', "(sv)");
-        if (r < 0)
-                return r;
-
         r = bus_unit_set_properties(u, message, runtime ? UNIT_RUNTIME : UNIT_PERSISTENT, true, error);
         if (r < 0)
                 return r;
 
-        r = sd_bus_message_exit_container(message);
-        if (r < 0)
-                return r;
-
         return sd_bus_reply_method_return(message, NULL);
 }
 
-- 
1.8.4.2



More information about the systemd-devel mailing list