summaryrefslogtreecommitdiff
path: root/src/login/loginctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-07-03 19:49:03 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:05:55 +0100
commitb767c85a403ee56b5f87bc9414638b857dabd18d (patch)
tree484271f6ff6a5070c93ca5852a9c895f7fc35a99 /src/login/loginctl.c
parent688fcb6e06c09634c9084fed3c20d792bdccb413 (diff)
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
Diffstat (limited to 'src/login/loginctl.c')
-rw-r--r--src/login/loginctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index a47563b50..31400d962 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -1656,7 +1656,7 @@ static int loginctl_main(int argc, char *argv[], sd_bus *bus) {
}
int main(int argc, char *argv[]) {
- _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+ _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
int r;
setlocale(LC_ALL, "");