Re: Connecting to DBus socket without specifying bus_name

I have fixed the bus_name parameter in Gio::DBus::Connection::call() and call_sync() in the git repository.


Den 2016-02-03 kl. 08:37, skrev Ian Arkver:
On 03/02/16 01:31, Gerlof Fokkema wrote:
Hello mailing list,

I'm trying to use the glibmm interface to connect to the PulseAudio DBus socket.
So far, I've managed to connect to the DBus Session bus and retrieve the socket address, and I've also managed to set up a connection to that DBus socket.

Source is here:

I'm having trouble calling DBus methods on the PulseAudio DBus socket,
because of what I think is a bug in the glibmm bindings.
auto sinks_result = this->conn->call_sync (

There is a QTPython application that also connects to this socket, but it leaves the busname empty
Calling this method without specifying bus_name also works when using glib, allowing the result to be converted glibmm.
See branch develop on the same git repository for example.

Am I correct in my understanding that because this is a standalone DBus socket,
the busname can be empty?
And if so, why doesn't glibmm allow the busname to be 0 or NULL, while the documentation does say that is acceptable input?

When I change the bus_name, "org.PulseAudio" to NULL, my program crashes with:
# ./project
> terminate called after throwing an instance of 'std::logic_error'
> what(): basic_string::_M_construct null not valid
> Aborted (core dumped)

Thanks in advance,

Gerlof Fokkema

This looks similar to the DBus::Connection::signal_describe problem from last September which required a patch from Murray to fix...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]