chiark / gitweb /
sd-bus: introduce new sd_bus_flush_close_unref() call
authorLennart Poettering <lennart@poettering.net>
Fri, 3 Jul 2015 17:49:03 +0000 (19:49 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:05:55 +0000 (10:05 +0100)
commitb767c85a403ee56b5f87bc9414638b857dabd18d
tree484271f6ff6a5070c93ca5852a9c895f7fc35a99
parent688fcb6e06c09634c9084fed3c20d792bdccb413
sd-bus: introduce new sd_bus_flush_close_unref() call

sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush()
(which writes all unwritten messages out) + sd_bus_close() (which
terminates the connection, releasing all unread messages) +
sd_bus_unref() (which frees the connection).

The combination of this call is used pretty frequently in systemd tools
right before exiting, and should also be relevant for most external
clients, and is hence useful to cover in a call of its own.

Previously the combination of the three calls was already done in the
_cleanup_bus_close_unref_ macro, but this was only available internally.

Also see #327
12 files changed:
src/cgroups-agent/cgroups-agent.c
src/libelogind/sd-bus/bus-util.h
src/libelogind/sd-bus/busctl.c
src/libelogind/sd-bus/sd-bus.c
src/libelogind/sd-bus/test-bus-chat.c
src/libelogind/sd-bus/test-bus-gvariant.c
src/libelogind/sd-bus/test-bus-match.c
src/libsystemd/libsystemd.sym
src/login/inhibit.c
src/login/loginctl.c
src/login/pam_elogind.c
src/systemd/sd-bus.h