Skip to content
Snippets Groups Projects
Commit b6f36abb authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#1430] Use shared connection instead of private

Not to confuse even if the class in dbus-c++ is called Private
parent 6f3df0e1
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,8 @@ Connection::Private::Private(DBusBusType type) ...@@ -48,7 +48,8 @@ Connection::Private::Private(DBusBusType type)
{ {
InternalError e; InternalError e;
conn = dbus_bus_get_private(type, e); conn = dbus_bus_get(type, e);
// conn = dbus_bus_get_private(type, e);
if (e) throw Error(e); if (e) throw Error(e);
...@@ -79,7 +80,7 @@ Connection::Private::~Private() ...@@ -79,7 +80,7 @@ Connection::Private::~Private()
void Connection::Private::init() void Connection::Private::init()
{ {
dbus_connection_ref(conn); dbus_connection_ref(conn);
dbus_connection_ref(conn); //todo: the library has to own another reference // dbus_connection_ref(conn); //todo: the library has to own another reference
disconn_filter = new Callback<Connection::Private, bool, const Message &>( disconn_filter = new Callback<Connection::Private, bool, const Message &>(
this, &Connection::Private::disconn_filter_function this, &Connection::Private::disconn_filter_function
...@@ -190,9 +191,13 @@ Connection Connection::ActivationBus() ...@@ -190,9 +191,13 @@ Connection Connection::ActivationBus()
Connection::Connection(const char *address, bool priv) Connection::Connection(const char *address, bool priv)
{ {
InternalError e; InternalError e;
/*
DBusConnection *conn = priv DBusConnection *conn = priv
? dbus_connection_open_private(address, e) ? dbus_connection_open_private(address, e)
: dbus_connection_open(address, e); : dbus_connection_open(address, e);
*/
DBusConnection *conn = dbus_connection_open(address, e);
if (e) throw Error(e); if (e) throw Error(e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment