From ef1f4e1e69338e5611a80b1110131b528377f624 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Mon, 26 Nov 2007 10:34:43 +0000 Subject: Fix bug introduced in last commit: jitter and stratum must be initialized at the begining (and /me must have some rest now). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/dermoth_ntp_rework@1836 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_ntp_peer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/check_ntp_peer.c') diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c index 5d21832b..a70e88ce 100644 --- a/plugins/check_ntp_peer.c +++ b/plugins/check_ntp_peer.c @@ -234,6 +234,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji status = STATE_OK; *offset_result = STATE_UNKNOWN; + *jitter = *stratum = -1; /* Long-winded explanation: * Getting the sync peer offset, jitter and stratum requires a number of @@ -576,7 +577,7 @@ int main(int argc, char *argv[]){ break; } if(!syncsource_found) - asprintf(&result_line, "%s %s, ", result_line, _("Server not synchronized")); + asprintf(&result_line, "%s %s,", result_line, _("Server not synchronized")); if(offset_result == STATE_UNKNOWN){ asprintf(&result_line, "%s %s", result_line, _("Offset unknown")); -- cgit v1.2.3-74-g34f1