From 04c7fd3bff5cf5506d301c6e33235e076074284e Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Wed, 2 Jan 2013 11:09:17 +0900 Subject: [PATCH] [Release] wrt-commons_0.2.89 Change-Id: I31303581a26a68ad6754e5bb33a6f684137d7242 --- debian/changelog | 12 ++++++++++++ modules/core/src/string.cpp | 2 -- modules/core/src/thread.cpp | 8 +++++++- modules/utils/src/wrt_global_settings.cpp | 2 +- .../include/dpl/wrt-dao-ro/global_config.h | 5 +++++ .../widget_dao/include/dpl/wrt-dao-ro/vconf_config.h | 9 +++++++++ packaging/wrt-commons.spec | 4 ++-- 7 files changed, 36 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 52e2fd1..4f04063 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +wrt-commons (0.2.89) unstable; urgency=low + + * Handle return value from pthread_setspecific + * Deleted array to 0 comparison + * Deleted unreachable code + * Add vconf key for memory saving mode + + * Git : framework/web/wrt-commons + * Tag : wrt-commons_0.2.89 + + -- Jihoon Chung Wed, 02 Jan 2013 11:00:02 +0900 + wrt-commons (0.2.88) unstable; urgency=low * Add path builder for vconf key diff --git a/modules/core/src/string.cpp b/modules/core/src/string.cpp index efb68c7..f03ccec 100644 --- a/modules/core/src/string.cpp +++ b/modules/core/src/string.cpp @@ -115,7 +115,6 @@ String FromUTF8String(const std::string& aIn) ThrowMsg(StringException::IconvConvertErrorUTF8ToUTF32, "iconv failed for " << "UTF-32 <- UTF-8" << "error: " << GetErrnoString()); - return String(); } // Ignore BOM in front of UTF-32 @@ -158,7 +157,6 @@ std::string ToUTF8String(const DPL::String& aIn) ThrowMsg(StringException::IconvConvertErrorUTF32ToUTF8, "iconv failed for " << "UTF-8 <- UTF-32" << "error: " << GetErrnoString()); - return std::string(); } return &output[0]; diff --git a/modules/core/src/thread.cpp b/modules/core/src/thread.cpp index 8dacad6..3974406 100644 --- a/modules/core/src/thread.cpp +++ b/modules/core/src/thread.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace // anonymous { @@ -118,7 +119,12 @@ void *Thread::StaticThreadEntry(void *param) Assert(This != NULL); // Set thread specific - pthread_setspecific(g_threadSpecific.threadSpecific, This); + int result = pthread_setspecific(g_threadSpecific.threadSpecific, This); + + if (result!=0) + { + LogError("Failed to set threadSpecific. Error: " << strerror(result)); + } // Enter thread proc // Do not allow exceptions to hit pthread core diff --git a/modules/utils/src/wrt_global_settings.cpp b/modules/utils/src/wrt_global_settings.cpp index 9cc9c56..9428fb3 100644 --- a/modules/utils/src/wrt_global_settings.cpp +++ b/modules/utils/src/wrt_global_settings.cpp @@ -67,7 +67,7 @@ MachineType getMachineType() // get current machine name struct utsname u; if (0 == uname(&u)) { - if ((!u.machine) || (0 == strlen(u.machine))) { + if (0 == strlen(u.machine)) { return MACHINE_TYPE_UNKNOWN; } else { // If current machine is emul, diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h index 87bf9d6..5558dbd 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h @@ -315,6 +315,11 @@ inline const char* GetVconfKeyFilesystemUsagePath() return "/filesystem_usage"; } +inline const char* GetVconfKeyMemorySavingModePath() +{ + return "/memory_saving_mode"; +} + } // namespace GlobalConfig } // namespace WrtDB diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h index 4a3c2cb..a30a84d 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h @@ -83,6 +83,15 @@ inline std::string GetVconfKeyFilesystemUsage(DPL::String pkgName) .GetFullPath(); } +inline std::string GetVconfKeyMemorySavingMode(DPL::String pkgName) +{ + return PathBuilder() + .Append(GlobalConfig::GetVconfKeyPrefixPath()) + .Append(DPL::ToUTF8String(pkgName)) + .Concat(GlobalConfig::GetVconfKeyMemorySavingModePath()) + .GetFullPath(); +} + } // namespace VconfConfig } // namespace WrtDB diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index a1ca79e..41357df 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -1,7 +1,7 @@ -#git:framework/web/wrt-commons wrt-commons 0.2.88 +#git:framework/web/wrt-commons wrt-commons 0.2.89 Name: wrt-commons Summary: Wrt common library -Version: 0.2.88 +Version: 0.2.89 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 -- 2.34.1