From: Piotr Kosko
Date: Fri, 15 Jul 2016 11:13:07 +0000 (+0200)
Subject: [Systeminfo] Fixed getPropertyValue issue
X-Git-Tag: submit/tizen/20160718.012312~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13db6c87bb0f779117559084955032a118b7067a;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Systeminfo] Fixed getPropertyValue issue
[Bug] When getPropertyValue failed, async operation counter was not updated properly
[Verification] Code compiles without errors
TCT passrate 100%.
Change-Id: I1490abf84d122eb34f236a54acdcee792f5659af
Signed-off-by: Piotr Kosko
---
diff --git a/src/systeminfo/systeminfo_manager.cc b/src/systeminfo/systeminfo_manager.cc
index c3323831..e9272fee 100644
--- a/src/systeminfo/systeminfo_manager.cc
+++ b/src/systeminfo/systeminfo_manager.cc
@@ -630,13 +630,12 @@ void SysteminfoManager::GetPropertyValue(const picojson::value& args, picojson::
LoggerD("Getting");
picojson::value result = picojson::value(picojson::object());
PlatformResult ret = prop_manager_.GetPropertyValue(prop_id, false, &result);
+ async_op_->finish();
if (ret.IsError()) {
LogAndReportError(ret,&(response->get()));
return;
}
ReportSuccess(result, response->get());
-
- async_op_->finish();
};
auto get_response = [this, callback_id](const std::shared_ptr& response) -> void {
@@ -667,6 +666,7 @@ void SysteminfoManager::GetPropertyValueArray(const picojson::value& args, picoj
picojson::value result = picojson::value(picojson::object());
PlatformResult ret = prop_manager_.GetPropertyValue(prop_id, true, &result);
+ async_op_->finish();
if (ret.IsError()) {
LogAndReportError(
ret, &(response->get()),
@@ -674,8 +674,6 @@ void SysteminfoManager::GetPropertyValueArray(const picojson::value& args, picoj
return;
}
ReportSuccess(result, response->get());
-
- async_op_->finish();
};
auto get_response = [this, callback_id](const std::shared_ptr& response) -> void {