From 60b71acf62e1245dc2c036624aa90afcc646855a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 26 Oct 2010 14:24:37 -0400 Subject: Move global D-Bus connection functions to dbus-common.c --- src/dbus-common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/dbus-common.c') 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; +} -- cgit v1.2.1