kdbus: catch up with latest libdbuspolicy API changes 38/67838/1 accepted/tizen/common/20160429.170330 accepted/tizen/ivi/20160429.011827 accepted/tizen/mobile/20160429.011802 accepted/tizen/tv/20160429.011722 accepted/tizen/wearable/20160429.011727 submit/tizen/20160428.152642
authorLukasz Skalski <l.skalski@samsung.com>
Thu, 28 Apr 2016 13:35:31 +0000 (15:35 +0200)
committerLukasz Skalski <l.skalski@samsung.com>
Thu, 28 Apr 2016 13:35:31 +0000 (15:35 +0200)
Change-Id: Ie68b9b9d88cb30f48341f7fcf8cc7caf01c06126

dbus/dbus-bus.c
dbus/dbus-connection-internal.h
dbus/dbus-transport-kdbus.c

index d910127..6c66e1c 100644 (file)
@@ -1606,23 +1606,4 @@ dbus_bus_remove_match (DBusConnection *connection,
   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 (&registered_address,
-                                   bus_connection_addresses[i]);
-
-          if (_dbus_string_find (&registered_address, 0, address, NULL))
-            return i;
-        }
-    }
-  return N_BUS_TYPES;
-}
-
 /** @} */
index dc74eaf..da2db4f 100644 (file)
@@ -160,7 +160,6 @@ const char* _dbus_connection_get_address (DBusConnection *connection);
  */
 
 void           _dbus_bus_notify_shared_connection_disconnected_unlocked (DBusConnection *connection);
-DBusBusType    _dbus_bus_get_address_type (const char *address);
 
 /** @} */
 
index e9aca6f..ba96b90 100644 (file)
@@ -4003,17 +4003,14 @@ new_kdbus_transport (kdbus_t          *kdbus,
 }
 
 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;
@@ -4088,8 +4085,7 @@ _dbus_transport_new_for_kdbus (const char *path,
       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,