From: NamKwanWoo Date: Mon, 12 Nov 2012 07:10:56 +0000 (+0900) Subject: [Version] 0.1.5 [Project] Tizen 2.0 [Title] fix lanaguage value X-Git-Tag: accepted/tizen_2.1/20130520.100420~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af5b69db2e1250f447ac24dad2fe8a1d9f658017;p=framework%2Fapi%2Fruntime-info.git [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 --- 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; }