summaryrefslogtreecommitdiffstats
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 63f9fd9..6dc9aa9 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -237,7 +237,7 @@ main (int argc, char **argv)
237 gettimeofday (&tv, NULL); 237 gettimeofday (&tv, NULL);
238 238
239 result = np_net_connect (server_address, server_port, &sd, PROTOCOL); 239 result = np_net_connect (server_address, server_port, &sd, PROTOCOL);
240 if (result == STATE_CRITICAL) return STATE_CRITICAL; 240 if (result == STATE_CRITICAL) return econn_refuse_state;
241 241
242#ifdef HAVE_SSL 242#ifdef HAVE_SSL
243 if (flags & FLAG_SSL){ 243 if (flags & FLAG_SSL){
@@ -463,10 +463,10 @@ process_arguments (int argc, char **argv)
463 usage5 (); 463 usage5 ();
464 case 'h': /* help */ 464 case 'h': /* help */
465 print_help (); 465 print_help ();
466 exit (STATE_OK); 466 exit (STATE_UNKNOWN);
467 case 'V': /* version */ 467 case 'V': /* version */
468 print_revision (progname, NP_VERSION); 468 print_revision (progname, NP_VERSION);
469 exit (STATE_OK); 469 exit (STATE_UNKNOWN);
470 case 'v': /* verbose mode */ 470 case 'v': /* verbose mode */
471 flags |= FLAG_VERBOSE; 471 flags |= FLAG_VERBOSE;
472 match_flags |= NP_MATCH_VERBOSE; 472 match_flags |= NP_MATCH_VERBOSE;
@@ -577,7 +577,8 @@ process_arguments (int argc, char **argv)
577 if ((temp=strchr(optarg,','))!=NULL) { 577 if ((temp=strchr(optarg,','))!=NULL) {
578 *temp='\0'; 578 *temp='\0';
579 if (!is_intnonneg (optarg)) 579 if (!is_intnonneg (optarg))
580 usage2 (_("Invalid certificate expiration period"), optarg); days_till_exp_warn = atoi(optarg); 580 usage2 (_("Invalid certificate expiration period"), optarg);
581 days_till_exp_warn = atoi (optarg);
581 *temp=','; 582 *temp=',';
582 temp++; 583 temp++;
583 if (!is_intnonneg (temp)) 584 if (!is_intnonneg (temp))