]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-bus/sd-bus.c
sd-bus: allow description to be set for system/user busses (#8594)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 29 Mar 2018 14:14:11 +0000 (16:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 29 Mar 2018 14:14:11 +0000 (16:14 +0200)
commit56fbd7187a5af44a90c258fbeb1f17114f226bb3
tree1cbca1b260953e6e1f95fc69bfc0e6af6c5980ff
parentc75436067f4b392ecf161e123279720dc5c3b33a
sd-bus: allow description to be set for system/user busses (#8594)

sd_bus_open/sd_bus_open_system/sd_bus_open_user are convenient, but
don't allow the description to be set. After they return, the bus is
is already started, and sd_bus_set_description() fails with -EBUSY.
It would be possible to allow sd_bus_set_description() to update the
description "live", but messages are already emitted from sd_bus_open
functions, so it's better to allow the description to be set in
sd_bus_open/sd_bus_open_system/sd_bus_open_user.

Fixes message like:
Bus n/a: changing state UNSET → OPENING
src/core/dbus.c
src/core/main.c
src/libsystemd/libsystemd.sym
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-bus/test-bus-chat.c
src/systemd/sd-bus.h