[Nagiosplug-checkins] nagiosplug/plugins check_hpjd.c,1.31,1.32

M. Sean Finney seanius at users.sourceforge.net
Mon Jun 27 06:09:31 CEST 2005


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6957

Modified Files:
	check_hpjd.c 
Log Message:
fixes from richard brodie (tracker id 1216576)

Index: check_hpjd.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_hpjd.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- check_hpjd.c	25 Dec 2004 23:17:44 -0000	1.31
+++ check_hpjd.c	27 Jun 2005 13:07:39 -0000	1.32
@@ -36,8 +36,8 @@
 #define HPJD_PAPER_STATUS          ".1.3.6.1.4.1.11.2.3.9.1.1.2.2"
 #define HPJD_INTERVENTION_REQUIRED ".1.3.6.1.4.1.11.2.3.9.1.1.2.3"
 #define HPJD_GD_PERIPHERAL_ERROR   ".1.3.6.1.4.1.11.2.3.9.1.1.2.6"
-#define HPJD_GD_PAPER_JAM          ".1.3.6.1.4.1.11.2.3.9.1.1.2.8"
-#define HPJD_GD_PAPER_OUT          ".1.3.6.1.4.1.11.2.3.9.1.1.2.9"
+#define HPJD_GD_PAPER_OUT          ".1.3.6.1.4.1.11.2.3.9.1.1.2.8"
+#define HPJD_GD_PAPER_JAM          ".1.3.6.1.4.1.11.2.3.9.1.1.2.9"
 #define HPJD_GD_TONER_LOW          ".1.3.6.1.4.1.11.2.3.9.1.1.2.10"
 #define HPJD_GD_PAGE_PUNT          ".1.3.6.1.4.1.11.2.3.9.1.1.2.11"
 #define HPJD_GD_MEMORY_OUT         ".1.3.6.1.4.1.11.2.3.9.1.1.2.12"
@@ -134,7 +134,7 @@
 		temp_buffer = strtok (input_buffer, "=");
 		temp_buffer = strtok (NULL, "=");
 
-		if (temp_buffer == NULL) {
+		if (temp_buffer == NULL && line < 13) {
 
 				result = STATE_UNKNOWN;
 				strcpy (errmsg, input_buffer);
@@ -179,8 +179,9 @@
 			case 12:										/* display panel message */
 				strcpy (display_message, temp_buffer + 1);
 				break;
-			default:
-				break;
+			default:										/* fold multiline message */
+				strncat (display_message, input_buffer, 
+						sizeof (display_message) - strlen (display_message) - 1);
 			}
 
 		}





More information about the Commits mailing list