From d44c0672bf49b805ee99583cd6645f7b94f223a7 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 23 Feb 2017 12:08:55 +0100 Subject: [PATCH] chrony: fix conversion of clock_last_meas value The f_since_sample field in source data has 32 bits. --- src/chrony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chrony.c b/src/chrony.c index 11310b19..0733e130 100644 --- a/src/chrony.c +++ b/src/chrony.c @@ -881,7 +881,7 @@ static int chrony_request_source_data(int p_src_idx, int *p_is_reachable) { chrony_push_data_valid("clock_reachability", src_addr, is_reachable, ntohs(chrony_resp.body.source_data.f_reachability)); chrony_push_data_valid("clock_last_meas", src_addr, is_reachable, - ntohs(chrony_resp.body.source_data.f_since_sample)); + ntohl(chrony_resp.body.source_data.f_since_sample)); return CHRONY_RC_OK; } -- 2.11.0