From: Tomasz Marciniak Date: Fri, 3 Jul 2015 09:15:08 +0000 (+0200) Subject: [KeyManager] Added logs when enter to the functions. X-Git-Tag: submit/tizen/20150702.103311^2~1^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4b7d2be57d6a91e054457ba692042b65e8ff512;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [KeyManager] Added logs when enter to the functions. [Verification] Code compiles without errors. Change-Id: Ib189190ab21fe2725dddf50545e37102818f15e7 Signed-off-by: Tomasz Marciniak --- diff --git a/src/keymanager/keymanager_instance.cc b/src/keymanager/keymanager_instance.cc index dcd135a8..75fc360b 100755 --- a/src/keymanager/keymanager_instance.cc +++ b/src/keymanager/keymanager_instance.cc @@ -341,12 +341,14 @@ void KeyManagerInstance::SaveKey(const picojson::value& args, auto save = [alias, pass, key_type, extractable, raw_buffer] (const std::shared_ptr& response) -> void { + LoggerD("Enter save_key"); ckmc_policy_s policy { const_cast(pass.c_str()), extractable }; ckmc_key_s key { const_cast(&(*raw_buffer)[0]), raw_buffer->size(), key_type, const_cast(pass.c_str()) }; int ret = ckmc_save_key(alias.c_str(), key, policy); if (CKMC_ERROR_NONE != ret) { + LoggerE("Failed to save key alias [%d]", ret); PlatformResult result = PlatformResult(ErrorCode::NO_ERROR); if (CKMC_ERROR_INVALID_PARAMETER == ret) { result = PlatformResult(ErrorCode::INVALID_VALUES_ERR, "Invalid parameter passed."); @@ -362,6 +364,7 @@ void KeyManagerInstance::SaveKey(const picojson::value& args, }; auto save_response = [this, callback_id](const std::shared_ptr& response) -> void { + LoggerD("Enter save_key_result"); picojson::object& obj = response->get(); obj.insert(std::make_pair("callbackId", picojson::value(callback_id))); this->PostMessage(response->serialize().c_str()); @@ -381,6 +384,7 @@ void KeyManagerInstance::RemoveAlias(const picojson::value& args, int ret = ckmc_remove_alias(alias.c_str()); if (CKMC_ERROR_NONE != ret) { + LoggerE("Failed to remove alias [%d]", ret); PlatformResult result = PlatformResult(ErrorCode::NO_ERROR); switch(ret) { case CKMC_ERROR_INVALID_PARAMETER: