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

Lennart Poettering lennart at poettering.net
Tue Dec 10 15:28:37 PST 2013


On Mon, 02.12.13 23:26, David Herrmann (dh.herrmann at gmail.com) wrote:

> 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().

Indeed! Thanks for the pointer! Applied!

> ---
> 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);
>  }
>  


Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list