From af5b69db2e1250f447ac24dad2fe8a1d9f658017 Mon Sep 17 00:00:00 2001 From: NamKwanWoo Date: Mon, 12 Nov 2012 16:10:56 +0900 Subject: [PATCH] [Version] 0.1.5 [Project] Tizen 2.0 [Title] fix lanaguage value [BinType] PDA [Customer] Public/Open/ ... [Issue#] N/A [Problem] language value have character set [Cause] vconf language value have character set [Solution] remove chracter set [Team] Kernel&SystemFW [Developer] kw46.nam [Request] N/A [Horizontal expansion] N/A [SCMRequest] N/A Change-Id: I572406f4475413d475fe4bca9038c8454b3ac9d2 --- src/runtime_info_locale.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/runtime_info_locale.c b/src/runtime_info_locale.c index e2bc74e..e214914 100755 --- a/src/runtime_info_locale.c +++ b/src/runtime_info_locale.c @@ -130,13 +130,20 @@ void runtime_info_first_day_of_week_unset_event_cb() int runtime_info_language_get_value(runtime_info_value_h value) { char *vconf_value; - + char *token = NULL; + if (runtime_info_vconf_get_value_string(VCONF_LANGUAGE, &vconf_value)) { return RUNTIME_INFO_ERROR_IO_ERROR; } - value->s = vconf_value; + token = strtok(vconf_value, "."); + value->s = strdup(token); + free(vconf_value); + if (value->s == NULL) { + LOGE("[%s] OUT_OF_MEMORY(0x%08x)", __func__, RUNTIME_INFO_ERROR_OUT_OF_MEMORY); + return RUNTIME_INFO_ERROR_OUT_OF_MEMORY; + } return RUNTIME_INFO_ERROR_NONE; } -- 2.7.4