Resolve the "Klocwork" detected defect and add debug feature.
[platform/framework/native/appfw.git] / src / app / FApp_AppSettingImpl.cpp
index 2b09b5d..d9aab4b 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -54,7 +53,6 @@ namespace Tizen { namespace App
 {
 
 const int APP_ID_LENTH = 10;
-const int MAX_CONTENT_LEN = 512;
 const int MAX_LOCAL_BUFSIZE = 128;
 const char* DBUS_PATH = "/setting/dbus_handler";
 const char* DBUS_SIGNAL_INTERFACE = "org.tizen.setting.signal";
@@ -633,7 +631,7 @@ _AppSettingImpl::Construct(const AppId& correspondAppId, const String& version)
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
        if (!__oldVersionInstance)
        {
-               SysTryReturnResult(NID_APP, InitizlizeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
+               SysTryReturnResult(NID_APP, InitializeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
        }
        r = Load();
        SysTryReturnResult(NID_APP, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Loading procedure failed.");
@@ -654,7 +652,7 @@ _AppSettingImpl::ConstructByAppPath(const AppId& correspondAppId, const Tizen::B
 
        r = __settingContainer.Construct();
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
-       SysTryReturnResult(NID_APP, InitizlizeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
+       SysTryReturnResult(NID_APP, InitializeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
        r = Load();
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -665,7 +663,7 @@ result
 _AppSettingImpl::Load(void)
 {
        SysTryReturnResult(NID_APP, File::IsFileExist(__filePath), E_OBJ_NOT_FOUND,
-                                          "The instance of specified AppId does not have setting information.");
+                                          "The instance of specified AppId does not have setting information. %ls", __filePath.GetPointer());
 
        result r = E_SUCCESS;
        std::unique_ptr<ByteBuffer> pfilePath(Tizen::Base::Utility::StringUtil::StringToUtf8N(__filePath));
@@ -969,7 +967,7 @@ _AppSettingImpl::UpdateProperty(xmlNodePtr pNode, const String& value)
 }
 
 bool
-_AppSettingImpl::InitizlizeDBus(void)
+_AppSettingImpl::InitializeDBus(void)
 {
        DBusError error;
        dbus_error_init(&error);