]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: add debug message to print number of resolved addresses
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 15 Jun 2015 11:03:11 +0000 (13:03 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 15 Jun 2015 11:03:11 +0000 (13:03 +0200)
ntp_sources.c

index 5ac3c86737e170af9ececdf660c44ee885541335..9c56255199ba1313e77ad4b842bccfaad7d47f35 100644 (file)
@@ -369,7 +369,7 @@ process_resolved_name(struct UnresolvedSource *us, IPAddr *ip_addrs, int n_addrs
   int i, added;
 
   for (i = added = 0; i < n_addrs; i++) {
-    DEBUG_LOG(LOGF_NtpSources, "%s resolved to %s", us->name, UTI_IPToString(&ip_addrs[i]));
+    DEBUG_LOG(LOGF_NtpSources, "(%d) %s", i + 1, UTI_IPToString(&ip_addrs[i]));
 
     address.ip_addr = ip_addrs[i];
     address.port = us->port;
@@ -399,6 +399,8 @@ name_resolve_handler(DNS_Status status, int n_addrs, IPAddr *ip_addrs, void *any
 
   assert(us == resolving_source);
 
+  DEBUG_LOG(LOGF_NtpSources, "%s resolved to %d addrs", us->name, n_addrs);
+
   switch (status) {
     case DNS_TryAgain:
       break;