kdbus: catch up with latest libdbuspolicy API changes 37/67837/1 accepted/tizen/common/20160429.170332 accepted/tizen/ivi/20160429.011828 accepted/tizen/mobile/20160429.011803 accepted/tizen/tv/20160429.011723 accepted/tizen/wearable/20160429.011729 submit/tizen/20160428.152642
authorLukasz Skalski <l.skalski@samsung.com>
Wed, 27 Apr 2016 09:32:05 +0000 (11:32 +0200)
committerLukasz Skalski <l.skalski@samsung.com>
Thu, 28 Apr 2016 11:32:05 +0000 (13:32 +0200)
Change-Id: I6bfb75785c7e817ad7a063f989671ab6d4279dc2

gio/gkdbus.c

index 7819fc3..a60a865 100755 (executable)
@@ -554,40 +554,18 @@ _g_kdbus_open (GKDBusWorker  *worker,
     }
 
 #ifdef LIBDBUSPOLICY
-  {
-    gint bus_type;
-
-    bus_type = -1;
-
-    if (g_str_has_prefix (address, "/sys/fs/kdbus/"))
-      {
-        if (g_str_has_suffix (address, "-system/bus"))
-          bus_type = SYSTEM_BUS;
-        else if (g_str_has_suffix (address, "-user/bus"))
-          bus_type = SESSION_BUS;
-      }
-
-    if ((bus_type == SYSTEM_BUS) || (bus_type == SESSION_BUS))
-      {
-        worker->dbuspolicy = dbuspolicy1_init (bus_type);
-        if (worker->dbuspolicy == NULL)
-          {
-            g_warning ("kdbus: cannot load dbus policy for kdbus transport");
-            close (worker->fd);
-            worker->fd = -1;
+  worker->dbuspolicy = dbuspolicy1_init (address);
+  if (worker->dbuspolicy == NULL)
+    {
+      g_warning ("kdbus: cannot load dbus policy for kdbus transport");
+      close (worker->fd);
+      worker->fd = -1;
 
-            return FALSE;
-          }
-      }
-    else
-      {
-        g_warning ("kdbus: cannot load dbus policy for custom bus");
-      }
-  }
+      return FALSE;
+    }
 #endif
 
   worker->closed = FALSE;
-
   return TRUE;
 }