fix system info cache.
authorHokwon Song <hokwon.song@samsung.com>
Tue, 17 Sep 2013 00:28:32 +0000 (09:28 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Tue, 17 Sep 2013 00:28:32 +0000 (09:28 +0900)
Change-Id: I68f5abcee1ad84a15a770ed65f7899c82a23dd2e
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
src/system/FSys_SettingService.cpp
src/system/FSys_SystemInfoService.cpp

index 3e4581e..879c09f 100644 (file)
@@ -406,6 +406,10 @@ CATCH:
 
                __responseMessage.AddItems(*response);
        }
+       else
+       {
+               SysLog(NID_SYS, "response is empty.");
+       }
 
        return true;
 }
@@ -528,6 +532,7 @@ void
 _SettingService::DestroySingleton(void)
 {
        delete __pSettingService;
+       __pSettingService = null;
 }
 
 }}
index 6846da7..1ab5b5a 100644 (file)
@@ -241,6 +241,7 @@ void
 _SystemInfoService::DestroySingleton(void)
 {
        delete __pSystemInfoService;
+       __pSystemInfoService = null;
 }
 
 result
@@ -1198,13 +1199,12 @@ _SystemInfoService::UpdateCacheFile(void)
 
        //For improve launch performance
        nValue = 0;
-       r = reg.GetValue(_SYSTEM_CACHING_SECTION, _SCREEN_DPI, nValue);
-       if(r != E_SUCCESS)
+       this->GetValue(_SCREEN_DPI, nValue);
+       if (reg.AddValue(_SYSTEM_CACHING_SECTION, _SCREEN_DPI, nValue) == E_KEY_ALREADY_EXIST)
        {
-               this->GetValue(_SCREEN_DPI, nValue);
-               reg.AddValue(_SYSTEM_CACHING_SECTION, _SCREEN_DPI, nValue);
-               reg.Flush();
+               reg.SetValue(_SYSTEM_CACHING_SECTION,_SCREEN_DPI, nValue);
        }
+       reg.Flush();
 
        nValue = 0;
        this->GetValue(_SCREEN_HEIGHT, nValue);