From: Miroslav Lichvar Date: Thu, 23 Feb 2017 11:08:55 +0000 (+0100) Subject: chrony: fix conversion of clock_last_meas value X-Git-Tag: collectd-5.8.0~172^2~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d44c0672bf49b805ee99583cd6645f7b94f223a7;p=collectd.git chrony: fix conversion of clock_last_meas value The f_since_sample field in source data has 32 bits. --- 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; }