summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-internal.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-20 22:56:25 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-20 23:00:10 +0100
commit89ffcd2ad5bf87866314e96c4179ba622851cd6e (patch)
treeb6415892e9160fbf11a95244617d69992d024026 /src/libsystemd-bus/bus-internal.h
parentfbfa72b0a1276366d50dce223c06efe9db9d6585 (diff)
bus: hook up client with socket communication
Diffstat (limited to 'src/libsystemd-bus/bus-internal.h')
-rw-r--r--src/libsystemd-bus/bus-internal.h11
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)))