summaryrefslogtreecommitdiffstats
path: root/plugins/check_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ldap.c')
-rw-r--r--plugins/check_ldap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index b21351b..207b98e 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -51,8 +51,8 @@ int ld_port = DEFAULT_PORT;
51#ifdef HAVE_LDAP_SET_OPTION 51#ifdef HAVE_LDAP_SET_OPTION
52int ld_protocol = DEFAULT_PROTOCOL; 52int ld_protocol = DEFAULT_PROTOCOL;
53#endif 53#endif
54int warn_time = UNDEFINED; 54double warn_time = UNDEFINED;
55int crit_time = UNDEFINED; 55double crit_time = UNDEFINED;
56struct timeval tv; 56struct timeval tv;
57 57
58int 58int
@@ -135,9 +135,9 @@ main (int argc, char *argv[])
135 printf (_("LDAP %s - %.3f seconds response time|%s\n"), 135 printf (_("LDAP %s - %.3f seconds response time|%s\n"),
136 state_text (status), 136 state_text (status),
137 elapsed_time, 137 elapsed_time,
138 perfdata ("time", microsec, "us", 138 fperfdata ("time", elapsed_time, "s",
139 warn_time, warn_time, 139 (int)warn_time, warn_time,
140 crit_time, crit_time, 140 (int)crit_time, crit_time,
141 TRUE, 0, FALSE, 0)); 141 TRUE, 0, FALSE, 0));
142 142
143 return status; 143 return status;
@@ -218,10 +218,10 @@ process_arguments (int argc, char **argv)
218 ld_passwd = optarg; 218 ld_passwd = optarg;
219 break; 219 break;
220 case 'w': 220 case 'w':
221 warn_time = atoi (optarg); 221 warn_time = strtod (optarg, NULL);
222 break; 222 break;
223 case 'c': 223 case 'c':
224 crit_time = atoi (optarg); 224 crit_time = strtod (optarg, NULL);
225 break; 225 break;
226#ifdef HAVE_LDAP_SET_OPTION 226#ifdef HAVE_LDAP_SET_OPTION
227 case '2': 227 case '2':