If we get more than one IP address, then add those
server addresses to the time server list so that they
can be tried if the first entry fails.
---
 src/timeserver.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/timeserver.c b/src/timeserver.c
index 467da52..e3e2fed 100644
--- a/src/timeserver.c
+++ b/src/timeserver.c
@@ -87,8 +87,12 @@ static void resolv_result(GResolvResultStatus status, char 
**results, gpointer u
 
        if (status == G_RESOLV_RESULT_STATUS_SUCCESS) {
                if (results != NULL) {
-                       for (i = 0; results[i]; i++)
+                       for (i = 0; results[i]; i++) {
                                DBG("result: %s", results[i]);
+                               if (i > 0)
+                                       __connman_timeserver_add_list(ts_list,
+                                                               results[i]);
+                       }
 
                        __connman_ntp_start(results[0]);
 
-- 
1.7.9.5

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to