diff options
author | David Zeuthen <davidz@redhat.com> | 2009-06-19 17:34:10 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-06-19 17:34:10 -0400 |
commit | 9b2b5cc59b8907a51157aa6e25c1e27dcad63e92 (patch) | |
tree | d9fc361a782636373297a718e19c3f03451c7d81 | |
parent | 57328ee2e60f01f0c160ff9ab2d5375a629cae09 (diff) |
Use a private D-Bus connection
Otherwise we run into problems in applications using multiple D-Bus
bindings, e.g. both eggdbus and dbus-glib.
-rw-r--r-- | src/eggdbus/eggdbusconnection.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eggdbus/eggdbusconnection.c b/src/eggdbus/eggdbusconnection.c index 51b22ec..adf1565 100644 --- a/src/eggdbus/eggdbusconnection.c +++ b/src/eggdbus/eggdbusconnection.c @@ -187,7 +187,10 @@ egg_dbus_connection_finalize (GObject *object) } if (priv->connection != NULL) - dbus_connection_unref (priv->connection); + { + dbus_connection_close (priv->connection); + dbus_connection_unref (priv->connection); + } /*g_debug ("connection finalized");*/ @@ -474,7 +477,7 @@ egg_dbus_connection_constructed (GObject *object) /* hmm.. we probably need to rethink error handling here */ dbus_error_init (&derror); - priv->connection = dbus_bus_get (dbus_bus_type, &derror); + priv->connection = dbus_bus_get_private (dbus_bus_type, &derror); if (priv->connection == NULL) { g_warning ("Error connecting to bus: %s: %s\n", |