summaryrefslogtreecommitdiffstats
path: root/plugins/check_hpjd.c
diff options
context:
space:
mode:
authorSubhendu Ghosh <sghosh@users.sourceforge.net>2003-04-13 04:49:58 (GMT)
committerSubhendu Ghosh <sghosh@users.sourceforge.net>2003-04-13 04:49:58 (GMT)
commit48ad288b899bc1f10b6ee18514b6fef51c8eb17a (patch)
tree8359748eddabbf5b75ff6c7de3644237320b58f8 /plugins/check_hpjd.c
parent1934d3c2252f4f2f9539acedf93737887598d34b (diff)
downloadmonitoring-plugins-48ad288b899bc1f10b6ee18514b6fef51c8eb17a.tar.gz
reduce compiler warning between gcc3 and gcc2.96
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@492 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_hpjd.c')
-rw-r--r--plugins/check_hpjd.c33
1 files changed, 4 insertions, 29 deletions
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index 7fb1d5a..6503d52 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*/