]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Set leap status by enum
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 13 Jun 2011 15:02:42 +0000 (17:02 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 13 Jun 2011 15:02:42 +0000 (17:02 +0200)
broadcast.c
ntp_core.c
refclock.c

index 6b022a00eee2b3aa368d475d7674e819254b8f18..4004195eb1559e45e56f0d2bea642938da874923 100644 (file)
@@ -91,7 +91,7 @@ timeout_handler(void *arbitrary)
   if (are_we_synchronised) {
     leap = (int) leap_status;
   } else {
-    leap = 3;
+    leap = LEAP_Unsynchronised;
   }
 
   message.lvm = ((leap << 6) &0xc0) | ((version << 3) & 0x38) | (MODE_BROADCAST & 0x07);
index 75c4b77ad73e100e27df05ba6dd372c459b1c551..4915316c821ec0592362b683ea2d345ef87007b7 100644 (file)
@@ -531,7 +531,7 @@ transmit_packet(NTP_Mode my_mode, /* The mode this machine wants to be */
   if (are_we_synchronised) {
     leap = (int) leap_status;
   } else {
-    leap = 3;
+    leap = LEAP_Unsynchronised;
   }
 
   /* Generate transmit packet */
index 6a47ff11205ae84a48f9ddd6432699bbeae7b396..0f8a64c59dc7ab1480be109ff83049983babf5fc 100644 (file)
@@ -177,7 +177,7 @@ RCL_AddRefclock(RefclockParameters *params)
   inst->driver_poll = params->driver_poll;
   inst->poll = params->poll;
   inst->driver_polled = 0;
-  inst->leap_status = 0;
+  inst->leap_status = LEAP_Normal;
   inst->pps_rate = params->pps_rate;
   inst->lock_ref = params->lock_ref_id;
   inst->offset = params->offset;