diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-01 02:16:35 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-01 02:19:24 +0200 |
commit | 279273b09a7bd2f81bf8f29fdf5fd92e8899f014 (patch) | |
tree | dc66144548ae96bc819a075c4256b2a313a1755a /plugins/ntpd.c | |
parent | 40ee49bad468402fa7242801979a392152a039c6 (diff) | |
download | connman-279273b09a7bd2f81bf8f29fdf5fd92e8899f014.tar.gz connman-279273b09a7bd2f81bf8f29fdf5fd92e8899f014.tar.bz2 connman-279273b09a7bd2f81bf8f29fdf5fd92e8899f014.zip |
Remove default ntpd server
Default ntpd servers should be defined by plugins. Now the MeeGo one
sets a default server instead of hardcoding it from the ntpd plugin.
Diffstat (limited to 'plugins/ntpd.c')
-rw-r--r-- | plugins/ntpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ntpd.c b/plugins/ntpd.c index 2ab30721..fa74ea85 100644 --- a/plugins/ntpd.c +++ b/plugins/ntpd.c @@ -45,7 +45,6 @@ static GList *peers = NULL; static GList *pending_peers = NULL; #define NTPD_PORT 123 -#define DEFAULT_NTP_PEER "ntp.meego.com" struct ntpd_peer { char *server; @@ -174,9 +173,6 @@ static int ntpdate(void) DBG("conf path %s", ntpdate->conf_path); - if (pending_peers == NULL && peers == NULL) - ntpdate_add_peer(ntpdate, DEFAULT_NTP_PEER); - for (list = pending_peers; list; list = list->next) { peer = list->data; @@ -216,6 +212,10 @@ static void ntpd_sync(void) DBG(""); + if (g_list_length(pending_peers) == 0 && + g_list_length(peers) == 0) + return; + if (!ntpd_running()) { ntpdate(); return; |