diff options
Diffstat (limited to 'src/libsystemd-bus/bus-internal.h')
-rw-r--r-- | src/libsystemd-bus/bus-internal.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-internal.h b/src/libsystemd-bus/bus-internal.h index d8cdc48ce0..9a12d661e1 100644 --- a/src/libsystemd-bus/bus-internal.h +++ b/src/libsystemd-bus/bus-internal.h @@ -50,8 +50,7 @@ enum bus_state { BUS_OPENING, BUS_AUTHENTICATING, BUS_HELLO, - BUS_RUNNING, - BUS_CLOSED + BUS_RUNNING }; struct sd_bus { @@ -60,7 +59,7 @@ struct sd_bus { int fd; int message_version; bool can_fds:1; - bool send_hello:1; + bool sent_hello:1; void *rbuffer; size_t rbuffer_size; @@ -99,3 +98,9 @@ struct sd_bus { size_t auth_size; char *auth_uid; }; + +static inline void bus_unrefp(sd_bus **b) { + sd_bus_unref(*b); +} + +#define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp))) |