Currently, timeserver is cleared after a period of time after setting.
However, in this method, there is a problem that timeserver cannot be
retrieved if the interface has no internet connection is connected
first, and then the interface has internet connection is connected
just before the timeserver is cleared.
Therefore, it has been modified so that timeserver is not cleared
until rebooting.
Change-Id: I2f5ca9f6d01bf7be2668338f3a159a401a0d46b5
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
Name: net-config
Summary: TIZEN Network Configuration service
Name: net-config
Summary: TIZEN Network Configuration service
Release: 1
Group: System/Network
License: Apache-2.0
Release: 1
Group: System/Network
License: Apache-2.0
static void __netconfig_set_timeserver(void)
{
static void __netconfig_set_timeserver(void)
{
- guint timeserver_clear_timer = 0;
int nitz_updated = 0;
netconfig_vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &nitz_updated);
int nitz_updated = 0;
netconfig_vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &nitz_updated);
return;
__netconfig_clock_set_timeserver((const char *)NTP_SERVER);
return;
__netconfig_clock_set_timeserver((const char *)NTP_SERVER);
-
- netconfig_start_timer_seconds(5, __netconfig_clock_clear_timeserver_timer,
- NULL, ×erver_clear_timer);
}
static void __network_changed_cb(keynode_t *node, void *user_data)
}
static void __network_changed_cb(keynode_t *node, void *user_data)
void netconfig_clock_init(void)
{
void netconfig_clock_init(void)
{
+ gboolean automatic_time_update = FALSE;
+
INFO("netconfig_clock_init is called");
vconf_notify_key_changed(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL,
__automatic_time_update_changed_cb, NULL);
INFO("netconfig_clock_init is called");
vconf_notify_key_changed(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL,
__automatic_time_update_changed_cb, NULL);
__nitz_event_cb, NULL);
vconf_notify_key_changed(VCONFKEY_NETWORK_STATUS,
__network_changed_cb, NULL);
__nitz_event_cb, NULL);
vconf_notify_key_changed(VCONFKEY_NETWORK_STATUS,
__network_changed_cb, NULL);
+
+ netconfig_vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &automatic_time_update);
+
+ if (automatic_time_update == FALSE)
+ __netconfig_clock_clear_timeserver_timer(NULL);
}
void netconfig_clock_deinit(void)
}
void netconfig_clock_deinit(void)