ActionState calls the dbus asynchronously 64/142664/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Mon, 7 Aug 2017 03:14:52 +0000 (12:14 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Mon, 7 Aug 2017 03:14:52 +0000 (12:14 +0900)
Change-Id: I82d117a8b5c0abcad40536595c2f081f40102fb7
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/server/state/ActionState.cpp

index fd6b30be81145da513cf41dfc87c2d006348aa5a..88e9e2d927ff9135ad3412380c895863885e2fba 100644 (file)
@@ -91,21 +91,14 @@ void ActionState::__callDBusMethod()
        JobDBusCall* action = static_cast<JobDBusCall*>(getJobInfo()->getAction());
        DBusCaller caller;
 
-       _D("Call %s.%s", action->getInterface().c_str(), action->getMethodName().c_str());
+       _I("Call %s.%s", action->getInterface().c_str(), action->getMethodName().c_str());
 
        GVariant* param = action->getParameters();
-       GVariant* result = caller.call(action->getBusName(), action->getObjectPath(),
+       caller.callAsync(action->getBusName(), action->getObjectPath(),
                        action->getInterface(), action->getMethodName(), param);
 
        if (param)
                g_variant_unref(param);
-
-       if (!result) {
-               _E("DBus call failed");
-               return;
-       }
-
-       g_variant_unref(result);
 }
 
 static void __aul_svc_result_cb(bundle* b, int requestCode, aul_svc_result_val result, void* data)
@@ -117,7 +110,7 @@ void ActionState::__sendAppControl()
 {
        IF_FAIL_VOID_TAG(getUid() != SYSTEM_UID, _W, "Not a user session");
 
-       _D("Send app-control to %u", static_cast<unsigned>(getUid()));
+       _I("Send app-control to %u", static_cast<unsigned>(getUid()));
 
        bundle* bn = static_cast<JobAppControl*>(getJobInfo()->getAction())->getAppControl();
        IF_FAIL_VOID_TAG(bn, _E, "App-control not found");
@@ -172,6 +165,8 @@ void ActionState::__postNotification()
 {
        IF_FAIL_VOID_TAG(getUid() != SYSTEM_UID, _W, "Not a user session");
 
+       _I("Post notification on %u", static_cast<unsigned>(getUid()));
+
        JobNotification* action = static_cast<JobNotification*>(getJobInfo()->getAction());
 
        notification_h notification = __create_notification(action->getTitle(),