diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-10-26 14:24:37 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-10-26 14:24:37 -0400 |
commit | 60b71acf62e1245dc2c036624aa90afcc646855a (patch) | |
tree | e94409cf7d5a350d2658b883f5d9c78fdd6a32be /src/dbus-common.c | |
parent | b079cca768419d11e011cc5a7d59bc802226e633 (diff) | |
download | bluez-60b71acf62e1245dc2c036624aa90afcc646855a.tar.gz |
Move global D-Bus connection functions to dbus-common.c
Diffstat (limited to 'src/dbus-common.c')
-rw-r--r-- | src/dbus-common.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dbus-common.c b/src/dbus-common.c index 89f06b9eb..c01f51e1a 100644 --- a/src/dbus-common.c +++ b/src/dbus-common.c @@ -53,6 +53,8 @@ #define RECONNECT_RETRY_TIMEOUT 5000 +static DBusConnection *connection = NULL; + static gboolean system_bus_reconnect(void *data) { DBusConnection *conn = get_dbus_connection(); @@ -321,3 +323,13 @@ dbus_bool_t emit_array_property_changed(DBusConnection *conn, return g_dbus_send_message(conn, signal); } + +void set_dbus_connection(DBusConnection *conn) +{ + connection = conn; +} + +DBusConnection *get_dbus_connection(void) +{ + return connection; +} |