DBus Connection Timeout



Hi,

I'm trying to use g_dbus_connection_new_for_address_sync() to connect
to message bus via TCP (dbus-daemon-proxy --session) as follows:

connection = g_dbus_connection_new_for_address_sync (
  "tcp:host=localhost,port=8080,family=ipv4",
  G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION |
    G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT,
  NULL,
  NULL,
  &temp_error
);

This function eventually returns with the error: WaitingForData:
unexpected response 'REJECTED EXTERNAL DBUS_COOKIE_SHA1 ANONYMOUS.

If I omit the G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT flag, the
function eventually returns with a timeout error.

Incidentally, d-feet (which uses Python's dbus package) has no
problems at all connecting to the above dbus address so I know
dbus-daemon-proxy is functioning correctly. Any ideas what I am
missing here?

Matt.


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