diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_hpjd.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 7fb1d5a7..6503d52d 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c | |||
@@ -91,6 +91,7 @@ main (int argc, char **argv) | |||
91 | int door_open = 0; | 91 | int door_open = 0; |
92 | int paper_output = 0; | 92 | int paper_output = 0; |
93 | char display_message[MAX_INPUT_BUFFER]; | 93 | char display_message[MAX_INPUT_BUFFER]; |
94 | char *temp ; | ||
94 | 95 | ||
95 | if (process_arguments (argc, argv) != OK) | 96 | if (process_arguments (argc, argv) != OK) |
96 | usage ("Invalid command arguments supplied\n"); | 97 | usage ("Invalid command arguments supplied\n"); |
@@ -280,14 +281,8 @@ main (int argc, char **argv) | |||
280 | /* if there wasn't any output, display an error */ | 281 | /* if there wasn't any output, display an error */ |
281 | if (line == 0) { | 282 | if (line == 0) { |
282 | 283 | ||
283 | /* | 284 | /* might not be the problem, but most likely is. */ |
284 | result=STATE_UNKNOWN; | 285 | result = STATE_UNKNOWN ; |
285 | strcpy(error_message,"Error: Could not read plugin output\n"); | ||
286 | */ | ||
287 | |||
288 | /* might not be the problem, but most likely is.. */ | ||
289 | result = STATE_UNKNOWN; | ||
290 | char *temp ; | ||
291 | asprintf (&temp, error_message); | 286 | asprintf (&temp, error_message); |
292 | sprintf (error_message, "%s : Timeout from host %s\n", temp, address ); | 287 | sprintf (error_message, "%s : Timeout from host %s\n", temp, address ); |
293 | 288 | ||
@@ -472,24 +467,4 @@ Usage:\n\ | |||
472 | } | 467 | } |
473 | 468 | ||
474 | 469 | ||
475 | /* | 470 | |
476 | if(argc<2||argc>3){ | ||
477 | printf("Incorrect number of arguments supplied\n"); | ||
478 | print_revision(argv[0],"$Revision$"); | ||
479 | printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"); | ||
480 | printf("License: GPL\n"); | ||
481 | printf("Usage: %s <ip_address> [community]\n",argv[0]); | ||
482 | printf("Note:\n"); | ||
483 | printf(" <ip_address> = The IP address of the JetDirect card\n"); | ||
484 | printf(" [community] = An optional community string used for SNMP communication\n"); | ||
485 | printf(" with the JetDirect card. The default is 'public'.\n"); | ||
486 | return STATE_UNKNOWN; | ||
487 | } | ||
488 | // get the IP address of the JetDirect device | ||
489 | strcpy(address,argv[1]); | ||
490 | // get the community name to use for SNMP communication | ||
491 | if(argc>=3) | ||
492 | strcpy(community,argv[2]); | ||
493 | else | ||
494 | strcpy(community,"public"); | ||
495 | */ | ||