diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-26 02:05:21 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-26 02:05:21 -0500 |
commit | ba132e9e521218efc5d35aa5f7a024cba93f5e29 (patch) | |
tree | 9328162d51cc85d99cf7c18b40e3b9684a17dedf /plugins/check_ntp_peer.c | |
parent | 0a74b6fda08c484cba7216596d2ffa3931b900e5 (diff) | |
download | monitoring-plugins-ba132e9e521218efc5d35aa5f7a024cba93f5e29.tar.gz |
Make extract_value more generic:
Add a separator argument passed using defines.
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 b40dbfcb..e8325bc8 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) |