aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_hpjd.c
diff options
context:
space:
mode:
authorGravatar M. Sean Finney <seanius@users.sourceforge.net> 2005-06-27 13:07:39 +0000
committerGravatar M. Sean Finney <seanius@users.sourceforge.net> 2005-06-27 13:07:39 +0000
commitf573447d1f6dbf25b58bbfea81226a2ae3736555 (patch)
tree243918f01dbf6c096e1e3ee52306e893dcfd4a58 /plugins/check_hpjd.c
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
Diffstat (limited to 'plugins/check_hpjd.c')
-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 dd49893b..b281c33a 100644
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
@@ -36,8 +36,8 @@ const char *option_summary = "-H host [-C community]\n";
#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 @@ main (int argc, char **argv)
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 @@ main (int argc, char **argv)
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);
}
}