From 7bcd4c44942921b6fd4461646ce9e50022b553ee Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 17 Jan 2011 17:00:13 -0500 Subject: Properly record when we get a valid leap second. --- driver_zodiac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'driver_zodiac.c') diff --git a/driver_zodiac.c b/driver_zodiac.c index 9d4ae87e..6bb78123 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -337,8 +337,10 @@ static void handle1108(struct gps_device_t *session) /* sequence = getzword(8); */ /* utc_week_seconds = getzlong(14); */ /* leap_nanoseconds = getzlong(17); */ - if ((int)(getzword(19) & 3) == 3) + if ((int)(getzword(19) & 3) == 3) { + session->context->valid |= LEAP_SECOND_VALID; session->context->leap_seconds = (int)getzword(16); + } } static gps_mask_t zodiac_analyze(struct gps_device_t *session) -- cgit v1.2.1