summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Sean Finney <seanius@users.sourceforge.net>2005-06-27 13:07:39 (GMT)
committerM. Sean Finney <seanius@users.sourceforge.net>2005-06-27 13:07:39 (GMT)
commitf573447d1f6dbf25b58bbfea81226a2ae3736555 (patch)
tree243918f01dbf6c096e1e3ee52306e893dcfd4a58
parent69e1b0fe391b611fed0dd57422dbff76d5ea9546 (diff)
downloadmonitoring-plugins-f573447d1f6dbf25b58bbfea81226a2ae3736555.tar.gz
fixes from richard brodie (tracker id 1216576)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1193 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_hpjd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index dd49893..b281c33 100644
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
@@ -36,8 +36,8 @@ const char *option_summary = "-H host [-C community]\n";
36#define HPJD_PAPER_STATUS ".1.3.6.1.4.1.11.2.3.9.1.1.2.2" 36#define HPJD_PAPER_STATUS ".1.3.6.1.4.1.11.2.3.9.1.1.2.2"
37#define HPJD_INTERVENTION_REQUIRED ".1.3.6.1.4.1.11.2.3.9.1.1.2.3" 37#define HPJD_INTERVENTION_REQUIRED ".1.3.6.1.4.1.11.2.3.9.1.1.2.3"
38#define HPJD_GD_PERIPHERAL_ERROR ".1.3.6.1.4.1.11.2.3.9.1.1.2.6" 38#define HPJD_GD_PERIPHERAL_ERROR ".1.3.6.1.4.1.11.2.3.9.1.1.2.6"
39#define HPJD_GD_PAPER_JAM ".1.3.6.1.4.1.11.2.3.9.1.1.2.8" 39#define HPJD_GD_PAPER_OUT ".1.3.6.1.4.1.11.2.3.9.1.1.2.8"
40#define HPJD_GD_PAPER_OUT ".1.3.6.1.4.1.11.2.3.9.1.1.2.9" 40#define HPJD_GD_PAPER_JAM ".1.3.6.1.4.1.11.2.3.9.1.1.2.9"
41#define HPJD_GD_TONER_LOW ".1.3.6.1.4.1.11.2.3.9.1.1.2.10" 41#define HPJD_GD_TONER_LOW ".1.3.6.1.4.1.11.2.3.9.1.1.2.10"
42#define HPJD_GD_PAGE_PUNT ".1.3.6.1.4.1.11.2.3.9.1.1.2.11" 42#define HPJD_GD_PAGE_PUNT ".1.3.6.1.4.1.11.2.3.9.1.1.2.11"
43#define HPJD_GD_MEMORY_OUT ".1.3.6.1.4.1.11.2.3.9.1.1.2.12" 43#define HPJD_GD_MEMORY_OUT ".1.3.6.1.4.1.11.2.3.9.1.1.2.12"
@@ -134,7 +134,7 @@ main (int argc, char **argv)
134 temp_buffer = strtok (input_buffer, "="); 134 temp_buffer = strtok (input_buffer, "=");
135 temp_buffer = strtok (NULL, "="); 135 temp_buffer = strtok (NULL, "=");
136 136
137 if (temp_buffer == NULL) { 137 if (temp_buffer == NULL && line < 13) {
138 138
139 result = STATE_UNKNOWN; 139 result = STATE_UNKNOWN;
140 strcpy (errmsg, input_buffer); 140 strcpy (errmsg, input_buffer);
@@ -179,8 +179,9 @@ main (int argc, char **argv)
179 case 12: /* display panel message */ 179 case 12: /* display panel message */
180 strcpy (display_message, temp_buffer + 1); 180 strcpy (display_message, temp_buffer + 1);
181 break; 181 break;
182 default: 182 default: /* fold multiline message */
183 break; 183 strncat (display_message, input_buffer,
184 sizeof (display_message) - strlen (display_message) - 1);
184 } 185 }
185 186
186 } 187 }