mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 01:30:00 -04:00
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
This commit is contained in:
parent
ef1863eed9
commit
ef1f4e1e69
1 changed files with 2 additions and 1 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue