]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Fix log messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Nov 2013 15:30:25 +0000 (16:30 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Nov 2013 17:41:51 +0000 (18:41 +0100)
conf.c
ntp_core.c
refclock_sock.c

diff --git a/conf.c b/conf.c
index 583a562b4793433c4d161e9a6af49db70379e46d..265cdb4414bd4c76250a25a0cddb7701be1dd3f3 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -1771,14 +1771,14 @@ CNF_SetupAccessRestrictions(void)
   for (node = ntp_auth_list.next; node != &ntp_auth_list; node = node->next) {
     status = NCR_AddAccessRestriction(&node->ip, node->subnet_bits, node->allow, node->all);
     if (!status) {
-      LOG_FATAL(LOGF_Configure, "Bad subnet for %08lx", node->ip);
+      LOG_FATAL(LOGF_Configure, "Bad subnet in %s/%d", UTI_IPToString(&node->ip), node->subnet_bits);
     }
   }
 
   for (node = cmd_auth_list.next; node != &cmd_auth_list; node = node->next) {
     status = CAM_AddAccessRestriction(&node->ip, node->subnet_bits, node->allow, node->all);
     if (!status) {
-      LOG_FATAL(LOGF_Configure, "Bad subnet for %08lx", node->ip);
+      LOG_FATAL(LOGF_Configure, "Bad subnet in %s/%d", UTI_IPToString(&node->ip), node->subnet_bits);
     }
   }
 }
index 0db12fd95a7535079149e394b5c96c9c2a093e5d..f17584e5af1a5920cbbb87ff8d36e8bc62054d1d 100644 (file)
@@ -1083,20 +1083,20 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
 #ifdef TRACEON
   LOG(LOGS_INFO, LOGF_NtpCore, "lvm=%o stratum=%d poll=%d prec=%d",
       message->lvm, message->stratum, message->poll, message->precision);
-  LOG(LOGS_INFO, LOGF_NtpCore, "Root delay=%08lx (%f), dispersion=%08lx (%f)",
+  LOG(LOGS_INFO, LOGF_NtpCore, "Root delay=%08x (%f), dispersion=%08x (%f)",
       message->root_delay, pkt_root_delay, message->root_dispersion, pkt_root_dispersion);
-  LOG(LOGS_INFO, LOGF_NtpCore, "Ref id=[%lx], ref_time=%08lx.%08lx [%s]",
+  LOG(LOGS_INFO, LOGF_NtpCore, "Ref id=[%x], ref_time=%08x.%08x [%s]",
       ntohl(message->reference_id),
       message->reference_ts.hi, message->reference_ts.lo,
       UTI_TimestampToString(&message->reference_ts));
-  LOG(LOGS_INFO, LOGF_NtpCore, "Originate=%08lx.%08lx [%s]",
+  LOG(LOGS_INFO, LOGF_NtpCore, "Originate=%08x.%08x [%s]",
       message->originate_ts.hi, message->originate_ts.lo,
       UTI_TimestampToString(&message->originate_ts));
-  LOG(LOGS_INFO, LOGF_NtpCore, "Message receive=%08lx.%08lx [%s]",
+  LOG(LOGS_INFO, LOGF_NtpCore, "Message receive=%08x.%08x [%s]",
       message->receive_ts.hi, message->receive_ts.lo,
       UTI_TimestampToString(&message->receive_ts));
 
-  LOG(LOGS_INFO, LOGF_NtpCore, "Transmit=%08lx.%08lx [%s]",
+  LOG(LOGS_INFO, LOGF_NtpCore, "Transmit=%08x.%08x [%s]",
       message->transmit_ts.hi, message->transmit_ts.lo,
       UTI_TimestampToString(&message->transmit_ts));
 
@@ -1128,7 +1128,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
     if (inst->opmode == MD_BURST_WAS_OFFLINE || inst->opmode == MD_BURST_WAS_ONLINE) {
       inst->burst_good_samples_to_go = 0;
       LOG(LOGS_WARN, LOGF_NtpCore, "Received KoD RATE from %s, burst sampling stopped",
-          UTI_IPToString(&inst->remote_addr.ip_addr), inst->minpoll);
+          UTI_IPToString(&inst->remote_addr.ip_addr));
     }
 
     requeue_transmit = 1;
index 8a1f86513c90d35df9764c9195a4394f8f3c106d..f746aa544cd0308ebfbc0af26d9a4112f79b0d8a 100644 (file)
@@ -63,7 +63,7 @@ static void read_sample(void *anything)
   }
 
   if (s != sizeof (sample)) {
-    LOG(LOGS_WARN, LOGF_Refclock, "Unexpected length of SOCK sample : %d != %d",
+    LOG(LOGS_WARN, LOGF_Refclock, "Unexpected length of SOCK sample : %d != %ld",
         s, sizeof (sample));
     return;
   }