From 77f1507e5da11831cade4a5c39bc4baf7082a17f Mon Sep 17 00:00:00 2001 From: Joohyun Kim Date: Thu, 4 Apr 2013 21:42:31 +0900 Subject: [PATCH] Fix Installation issue Change-Id: I1d157391a38c2f13c3e0cf7b98293a869bd09f79 Signed-off-by: Joohyun Kim --- src/system/FSys_CommunicationDispatcherClient.cpp | 8 ++++++++ src/system/FSys_PowerManagerImpl.cpp | 4 ++-- src/system/FSys_SystemClient.cpp | 7 +++++++ src/system/FSys_SystemInfoImpl.cpp | 18 +++++++++--------- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/system/FSys_CommunicationDispatcherClient.cpp b/src/system/FSys_CommunicationDispatcherClient.cpp index 3d47a9d..bc7d8e6 100644 --- a/src/system/FSys_CommunicationDispatcherClient.cpp +++ b/src/system/FSys_CommunicationDispatcherClient.cpp @@ -33,6 +33,7 @@ using namespace Tizen::Io; namespace Tizen { namespace System { +bool ipcReady = false; static const wchar_t* _COMMUNICATION_DISPATCHER_IPC_ID = L"osp.app.ipcserver.communicationdispatcher"; _CommunicationDispatcherClient* _CommunicationDispatcherClient::__pCommunicationDispatcherClient = null; @@ -47,6 +48,10 @@ _CommunicationDispatcherClient::_CommunicationDispatcherClient() SysTryCatch(NID_SYS, __pIpcClient != null, , r, "It is failed to create IPC client"); r = __pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID, this); + if(r != E_SUCCESS) + ipcReady = false; + else + ipcReady = true; SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "Propagated. [%s]", GetErrorMessage(r)); CATCH: @@ -75,6 +80,9 @@ _CommunicationDispatcherClient::GetInstance() _IpcClient* _CommunicationDispatcherClient::GetIpcClient() { + if(ipcReady == false) + return null; + return __pIpcClient; } diff --git a/src/system/FSys_PowerManagerImpl.cpp b/src/system/FSys_PowerManagerImpl.cpp index e32b94f..209d466 100644 --- a/src/system/FSys_PowerManagerImpl.cpp +++ b/src/system/FSys_PowerManagerImpl.cpp @@ -240,9 +240,9 @@ PowerChangedCallback(power_state_e state, void* userData) } } } - else + else if(state == POWER_STATE_NORMAL) { - for (int i = 0; i < __pSceenEventList->GetCount(); i++) + for (int i = 0; i < __pSceenEventList->GetCount(); i++) { IScreenEventListener* pIScreenEventListener = null; result r = E_SUCCESS; diff --git a/src/system/FSys_SystemClient.cpp b/src/system/FSys_SystemClient.cpp index 54c506c..acc905f 100644 --- a/src/system/FSys_SystemClient.cpp +++ b/src/system/FSys_SystemClient.cpp @@ -98,8 +98,10 @@ _SystemClient::GetValue(const String& key, bool& value) String commandId(_SYSTEM_COMMAND_GET_BOOL); _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); + SysTryReturnResult(NID_SYS, pCommunicationDispatcherClient != null, E_SYSTEM, "It is failed to get Communication Dispatcher."); __pIpcClient = pCommunicationDispatcherClient->GetIpcClient(); + SysTryReturnResult(NID_SYS, __pIpcClient != null, E_SYSTEM, "It is failed to get IPC client."); ArrayList requestMessages; ArrayList responseMessages; @@ -146,8 +148,10 @@ _SystemClient::GetValue(const String& key, int& value) String commandId(_SYSTEM_COMMAND_GET_INT); _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); + SysTryReturnResult(NID_SYS, pCommunicationDispatcherClient != null, E_SYSTEM, "It is failed to get Communication Dispatcher."); __pIpcClient = pCommunicationDispatcherClient->GetIpcClient(); + SysTryReturnResult(NID_SYS, __pIpcClient != null, E_SYSTEM, "It is failed to get IPC client."); ArrayList requestMessages; ArrayList responseMessages; @@ -177,6 +181,7 @@ _SystemClient::GetValue(const String& key, int& value) SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, "Result value[%ls] convert is failed.", pValue->GetPointer()); responseMessages.RemoveAll(true); + return r; } @@ -189,8 +194,10 @@ _SystemClient::GetValue(const String& key, String& value) String commandId(_SYSTEM_COMMAND_GET_STRING); _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); + SysTryReturnResult(NID_SYS, pCommunicationDispatcherClient != null, E_SYSTEM, "It is failed to get Communication Dispatcher."); __pIpcClient = pCommunicationDispatcherClient->GetIpcClient(); + SysTryReturnResult(NID_SYS, __pIpcClient != null, E_SYSTEM, "It is failed to get IPC client."); ArrayList requestMessages; ArrayList responseMessages; diff --git a/src/system/FSys_SystemInfoImpl.cpp b/src/system/FSys_SystemInfoImpl.cpp index 701b2f0..86eaf5d 100644 --- a/src/system/FSys_SystemInfoImpl.cpp +++ b/src/system/FSys_SystemInfoImpl.cpp @@ -655,10 +655,10 @@ _SystemInfoImpl::GetFromRegistry(const String& key, String& value) String valStr; r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null); - SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " RegistryImpl construct It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " RegistryImpl construct is failed"); r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr); - SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " Registry GetValue It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " Registry GetValue is failed"); if(valStr == L"true" || valStr == L"false") { @@ -679,13 +679,13 @@ _SystemInfoImpl::GetFromRegistry(const String& key, int& value) _RegistryImpl _reg; String valStr; r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct is failed"); r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue It is failed"); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue is failed"); r = Integer::Parse(valStr, value); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, " Integer::Parse() It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, " Integer::Parse() is failed"); return E_SUCCESS; } @@ -696,11 +696,11 @@ _SystemInfoImpl::GetFromRegistry(const String& key, bool& value) _RegistryImpl _reg; String valStr; r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct is failed"); r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue It is failed"); - SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue It is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue is failed"); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue is failed"); if(valStr == L"true") { value = true; -- 2.7.4