SettingTimeData *ad = (SettingTimeData *) user_data;
- char *city = NULL;
char *tzpath = NULL;
- app_control_get_extra_data(reply, "city", &city);
app_control_get_extra_data(reply, "tzpath", &tzpath);
-
if (!tzpath) {
- SETTING_TRACE("tzpath from worldclock UG is null.");
+ SETTING_TRACE_ERROR("tzpath from worldclock UG is null.");
setting_update_timezone(ad);
return;
- } else {
- SETTING_TRACE("tzpath : %s", tzpath);
}
- SETTING_TRACE("city : %s", city);
-
- /* ----------------------------------------------------------------- */
-
SETTING_TRACE("tzpath:(%s)", tzpath);
int ret = _set_timezone_helper(tzpath);
if (ret < 0) {
- SETTING_TRACE("tzpath is not valid.");
- if (tzpath)
- FREE(tzpath);
- if (city)
- FREE(city);
+ SETTING_TRACE_ERROR("tzpath is not valid.");
+ free(tzpath);
return;
- } else
- SETTING_TRACE("_set_timezone_helper - successful : "
+ }
+ SETTING_TRACE("_set_timezone_helper - successful : "
"%s \n", tzpath);
+ char *city = NULL;
+ app_control_get_extra_data(reply, "city", &city);
+ if (!city) {
+ SETTING_TRACE_ERROR("city from worldclock UG is null.");
+ free(tzpath);
+ return;
+ }
+ SETTING_TRACE("city : %s", city);
+
ret = vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, city);
- setting_retm_if(ret != 0, "set vconf failed");
+ if (ret != 0) {
+ SETTING_TRACE_ERROR("set vconf failed");
+ free(tzpath);
+ free(city);
+ return;
+ }
/* parse city and GMT offset from tzpath and system time property */
/* set the strings in vconf which will be used while updating display
* of timezone */
if (!__setting_set_city_tzone(tzpath)) {
- SETTING_TRACE("__setting_set_city_tzone ERROR");
- if (tzpath)
- FREE(tzpath);
- if (city)
- FREE(city);
+ SETTING_TRACE_ERROR("__setting_set_city_tzone ERROR");
+ free(tzpath);
+ free(city);
return;
}
setting_update_timezone(ad);
static int t_event_val = 0;
vconf_set_int(VCONFKEY_SYSTEM_TIME_CHANGED, t_event_val);
- if (tzpath)
- FREE(tzpath);
- if (city)
- FREE(city);
+ free(tzpath);
+ free(city);
SETTING_TRACE_END;
}