diff options
Diffstat (limited to 'plugins/check_ntp_peer.c')
-rw-r--r-- | plugins/check_ntp_peer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c index b40dbfc..e8325bc 100644 --- a/plugins/check_ntp_peer.c +++ b/plugins/check_ntp_peer.c | |||
@@ -333,7 +333,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji | |||
333 | if(verbose) | 333 | if(verbose) |
334 | printf("parsing offset from peer %.2x: ", ntohs(peers[i].assoc)); | 334 | printf("parsing offset from peer %.2x: ", ntohs(peers[i].assoc)); |
335 | 335 | ||
336 | value = np_extract_value(data, "offset"); | 336 | value = np_extract_ntpvar(data, "offset"); |
337 | nptr=NULL; | 337 | nptr=NULL; |
338 | /* Convert the value if we have one */ | 338 | /* Convert the value if we have one */ |
339 | if(value != NULL) | 339 | if(value != NULL) |
@@ -357,7 +357,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji | |||
357 | if(verbose) { | 357 | if(verbose) { |
358 | printf("parsing %s from peer %.2x: ", strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter", ntohs(peers[i].assoc)); | 358 | printf("parsing %s from peer %.2x: ", strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter", ntohs(peers[i].assoc)); |
359 | } | 359 | } |
360 | value = np_extract_value(data, strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter"); | 360 | value = np_extract_ntpvar(data, strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter"); |
361 | nptr=NULL; | 361 | nptr=NULL; |
362 | /* Convert the value if we have one */ | 362 | /* Convert the value if we have one */ |
363 | if(value != NULL) | 363 | if(value != NULL) |
@@ -376,7 +376,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji | |||
376 | if(verbose) { | 376 | if(verbose) { |
377 | printf("parsing stratum from peer %.2x: ", ntohs(peers[i].assoc)); | 377 | printf("parsing stratum from peer %.2x: ", ntohs(peers[i].assoc)); |
378 | } | 378 | } |
379 | value = np_extract_value(data, "stratum"); | 379 | value = np_extract_ntpvar(data, "stratum"); |
380 | nptr=NULL; | 380 | nptr=NULL; |
381 | /* Convert the value if we have one */ | 381 | /* Convert the value if we have one */ |
382 | if(value != NULL) | 382 | if(value != NULL) |