aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ntp_peer.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-01-26 02:05:21 -0500
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-01-26 02:05:21 -0500
commitba132e9e521218efc5d35aa5f7a024cba93f5e29 (patch)
tree9328162d51cc85d99cf7c18b40e3b9684a17dedf /plugins/check_ntp_peer.c
parent0a74b6fda08c484cba7216596d2ffa3931b900e5 (diff)
downloadmonitoring-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.c6
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
if(verbose)
printf("parsing offset from peer %.2x: ", ntohs(peers[i].assoc));
- value = np_extract_value(data, "offset");
+ value = np_extract_ntpvar(data, "offset");
nptr=NULL;
/* Convert the value if we have one */
if(value != NULL)
@@ -357,7 +357,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji
if(verbose) {
printf("parsing %s from peer %.2x: ", strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter", ntohs(peers[i].assoc));
}
- value = np_extract_value(data, strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter");
+ value = np_extract_ntpvar(data, strstr(getvar, "dispersion") != NULL ? "dispersion" : "jitter");
nptr=NULL;
/* Convert the value if we have one */
if(value != NULL)
@@ -376,7 +376,7 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji
if(verbose) {
printf("parsing stratum from peer %.2x: ", ntohs(peers[i].assoc));
}
- value = np_extract_value(data, "stratum");
+ value = np_extract_ntpvar(data, "stratum");
nptr=NULL;
/* Convert the value if we have one */
if(value != NULL)