summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_ldap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 15113b1f..868ffc1e 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -71,9 +71,9 @@ thresholds *entries_thresholds = NULL;
71struct timeval tv; 71struct timeval tv;
72char* warn_entries = NULL; 72char* warn_entries = NULL;
73char* crit_entries = NULL; 73char* crit_entries = NULL;
74int starttls = FALSE; 74bool starttls = false;
75int ssl_on_connect = FALSE; 75bool ssl_on_connect = false;
76int verbose = 0; 76bool verbose = false;
77 77
78/* for ldap tls */ 78/* for ldap tls */
79 79
@@ -115,7 +115,7 @@ main (int argc, char *argv[])
115 usage4 (_("Could not parse arguments")); 115 usage4 (_("Could not parse arguments"));
116 116
117 if (strstr(argv[0],"check_ldaps") && ! starttls && ! ssl_on_connect) 117 if (strstr(argv[0],"check_ldaps") && ! starttls && ! ssl_on_connect)
118 starttls = TRUE; 118 starttls = true;
119 119
120 /* initialize alarm signal handling */ 120 /* initialize alarm signal handling */
121 signal (SIGALRM, socket_timeout_alarm_handler); 121 signal (SIGALRM, socket_timeout_alarm_handler);
@@ -253,11 +253,11 @@ main (int argc, char *argv[])
253 fperfdata ("time", elapsed_time, "s", 253 fperfdata ("time", elapsed_time, "s",
254 (int)warn_time, warn_time, 254 (int)warn_time, warn_time,
255 (int)crit_time, crit_time, 255 (int)crit_time, crit_time,
256 TRUE, 0, FALSE, 0), 256 true, 0, false, 0),
257 sperfdata ("entries", (double)num_entries, "", 257 sperfdata ("entries", (double)num_entries, "",
258 warn_entries, 258 warn_entries,
259 crit_entries, 259 crit_entries,
260 TRUE, 0.0, FALSE, 0.0)); 260 true, 0.0, false, 0.0));
261 } else { 261 } else {
262 printf (_("LDAP %s - %.3f seconds response time|%s\n"), 262 printf (_("LDAP %s - %.3f seconds response time|%s\n"),
263 state_text (status), 263 state_text (status),
@@ -265,7 +265,7 @@ main (int argc, char *argv[])
265 fperfdata ("time", elapsed_time, "s", 265 fperfdata ("time", elapsed_time, "s",
266 (int)warn_time, warn_time, 266 (int)warn_time, warn_time,
267 (int)crit_time, crit_time, 267 (int)crit_time, crit_time,
268 TRUE, 0, FALSE, 0)); 268 true, 0, false, 0));
269 } 269 }
270 270
271 return status; 271 return status;
@@ -313,7 +313,7 @@ process_arguments (int argc, char **argv)
313 strcpy (argv[c], "-t"); 313 strcpy (argv[c], "-t");
314 } 314 }
315 315
316 while (1) { 316 while (true) {
317 c = getopt_long (argc, argv, "hvV234TS6t:c:w:H:b:p:a:D:P:C:W:", longopts, &option); 317 c = getopt_long (argc, argv, "hvV234TS6t:c:w:H:b:p:a:D:P:C:W:", longopts, &option);
318 318
319 if (c == -1 || c == EOF) 319 if (c == -1 || c == EOF)
@@ -374,17 +374,17 @@ process_arguments (int argc, char **argv)
374 address_family = AF_INET; 374 address_family = AF_INET;
375 break; 375 break;
376 case 'v': 376 case 'v':
377 verbose++; 377 verbose = true;
378 break; 378 break;
379 case 'T': 379 case 'T':
380 if (! ssl_on_connect) 380 if (! ssl_on_connect)
381 starttls = TRUE; 381 starttls = true;
382 else 382 else
383 usage_va(_("%s cannot be combined with %s"), "-T/--starttls", "-S/--ssl"); 383 usage_va(_("%s cannot be combined with %s"), "-T/--starttls", "-S/--ssl");
384 break; 384 break;
385 case 'S': 385 case 'S':
386 if (! starttls) { 386 if (! starttls) {
387 ssl_on_connect = TRUE; 387 ssl_on_connect = true;
388 if (ld_port == -1) 388 if (ld_port == -1)
389 ld_port = LDAPS_PORT; 389 ld_port = LDAPS_PORT;
390 } else 390 } else