"The connection is closed" with g_dbus_connection_new_for_address and TCP/IP

Lars Hanisch dvb at flensrocker.de
Mon May 20 06:52:10 PDT 2013


Am 20.05.2013 12:10, schrieb Simon McVittie:
> On 20/05/13 10:44, Lars Hanisch wrote:
>>  Due to other reasons I must port this to GDBus. As I understand the documentation I have to use
>> g_dbus_connection_new_for_address with the address "tcp:host=hdvdr,port=36761". I tried several flags like
>> G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION (which should be the right one, I think), but
>> g_dbus_connection_new_for_address_finish always returns with the error "The connection is closed".
> 
> I think you need both G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
> G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION in the flags.

 Thanks, that did it!

 BTW, should I only g_object_unref the GDBusConnection or should it be closed or anything? That's something I haven't
understood with DBus. It's clear that connections to the system and session bus are shared and should not be closed but
I'm not sure with this kind of connections.

> Failing that, see the documentation of the G_DBUS_DEBUG environment
> variable in <https://developer.gnome.org/gio/stable/running-gio-apps.html>.

 I will read that anyway. Who knows what it's good for. :)

Regards,
Lars.

> 
>     S
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>


More information about the dbus mailing list