diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-22 14:13:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-22 16:29:10 +0200 |
commit | fa2f8973adf9cfb6cc2a69bcfe209b125ee3a3ce (patch) | |
tree | b7ad811da7c64eac842f158f4297dd2545f3e35c /src/systemd | |
parent | c97e586d8a18db5dc505d76059ed1d9add234925 (diff) |
sd-bus: introduce new sd_bus_default_flush_close() call
If code enqueues a message on one of the default busses, but doesn't
sync on it, and immediately drops the reference to the bus again, it
will stay queued and consume memory. Intrdouce a new call
sd_bus_default_flush_close() that can be invoked at the end of programs
(or threads) and flushes out all unsent messages on any of the default
busses.
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-bus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 5439a1903b..0883203ae7 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -158,6 +158,8 @@ sd_bus *sd_bus_ref(sd_bus *bus); sd_bus *sd_bus_unref(sd_bus *bus); sd_bus *sd_bus_flush_close_unref(sd_bus *bus); +void sd_bus_default_flush_close(void); + int sd_bus_is_open(sd_bus *bus); int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id); |