dbus_message_unref (msg);
}
-DBusBusType
-_dbus_bus_get_address_type (const char *address)
-{
- int i = 0;
- for (; i < N_BUS_TYPES; i++)
- {
- if (bus_connection_addresses[i] != NULL)
- {
- DBusString registered_address;
- _dbus_string_init_const (®istered_address,
- bus_connection_addresses[i]);
-
- if (_dbus_string_find (®istered_address, 0, address, NULL))
- return i;
- }
- }
- return N_BUS_TYPES;
-}
-
/** @} */
}
static dbus_bool_t
-initialize_policies (DBusTransportKdbus *transport, DBusBusType bus_type)
+initialize_policies (DBusTransportKdbus *transport, const char *path)
{
dbus_bool_t result = TRUE;
#ifdef LIBDBUSPOLICY
- if (DBUS_BUS_SYSTEM == bus_type || DBUS_BUS_SESSION == bus_type)
- {
- transport->policy = dbuspolicy1_init (bus_type);
- if (NULL == transport->policy)
- result = FALSE;
- }
+ transport->policy = dbuspolicy1_init (path);
+ if (NULL == transport->policy)
+ result = FALSE;
#endif
return result;
goto failed_1;
}
- if (!initialize_policies (transport,
- _dbus_bus_get_address_type (_dbus_string_get_data (&address))))
+ if (!initialize_policies (transport, path))
{
dbus_set_error (error,
DBUS_ERROR_FAILED,