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.
if (status == G_RESOLV_RESULT_STATUS_SUCCESS) {
if (results != NULL) {
- for (i = 0; results[i]; i++)
- DBG("result: %s", results[i]);
+ for (i = 0; results[i]; i++) {
+ DBG("result[%d]: %s", i, results[i]);
+ if (i == 0)
+ continue;
+
+ ts_list = __connman_timeserver_add_list(
+ ts_list, results[i]);
+ }
__connman_ntp_start(results[0]);