dbus: Modify dbus init sequence 16/236416/1
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Wed, 17 Jun 2020 02:39:25 +0000 (11:39 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Wed, 17 Jun 2020 02:39:33 +0000 (11:39 +0900)
Change-Id: Id17b9f397d12833ea97765d156cf47f57b5758ac
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
src/launcher/launcher.c

index c344c06..f131603 100644 (file)
@@ -365,18 +365,6 @@ static int register_dbus(void)
                }
        } while (retry <= RETRY_MAX);
 
-       retry = 0;
-       do {
-               edbus_request_name = e_dbus_request_name(edbus_conn, BUS_NAME, 0, NULL, NULL);
-               if (edbus_request_name)
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("Failed to request edbus name.");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-       } while (retry <= RETRY_MAX);
-
        for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
                edbus_objects[i].obj = e_dbus_object_add(edbus_conn, edbus_objects[i].path, NULL);
                if (!(edbus_objects[i].obj)) {
@@ -395,6 +383,18 @@ static int register_dbus(void)
                e_dbus_object_interface_attach(edbus_objects[i].obj, edbus_objects[i].iface);
        }
 
+       retry = 0;
+       do {
+               edbus_request_name = e_dbus_request_name(edbus_conn, BUS_NAME, 0, NULL, NULL);
+               if (edbus_request_name)
+                       break;
+               if (++retry == RETRY_MAX) {
+                       _E("Failed to request edbus name.");
+                       ret = -ECONNREFUSED;
+                       goto out2;
+               }
+       } while (retry <= RETRY_MAX);
+
        return 0;
 
 out2: