summaryrefslogtreecommitdiffstats
path: root/lib/Nagios/Plugin
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2010-03-09 23:42:58 -0500
committerThomas Guyot-Sionnest <dermoth@aei.ca>2010-03-09 23:49:30 -0500
commit58a1764446e5a1a30db360ee7a69555d7f2e8f1a (patch)
treea37dec36587cea82e018647226e6c5f29b29c83a /lib/Nagios/Plugin
parent2db061c32e448cc725b5baf9ba0f42acba9ec8f6 (diff)
downloadmonitoring-plugin-perl-58a1764446e5a1a30db360ee7a69555d7f2e8f1a.tar.gz
Fix nagios_die wrapper not properly passing last argument to nagios_exit
nagios_die() accepts many ways of specifying arguments. One of them is passing the message only, in which case the last argument added by Plugins.pm is on the 2nd position instead of the 3rd. One visible effect of this bug is the inability to print custom "shortname" with nagios_die when the exit code is not specified.
Diffstat (limited to 'lib/Nagios/Plugin')
-rw-r--r--lib/Nagios/Plugin/Functions.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Nagios/Plugin/Functions.pm b/lib/Nagios/Plugin/Functions.pm
index 9a8272a..4ff6118 100644
--- a/lib/Nagios/Plugin/Functions.pm
+++ b/lib/Nagios/Plugin/Functions.pm
@@ -173,7 +173,7 @@ sub nagios_die {
173 173
174 # Else just assume $arg1 is the message and hope for the best 174 # Else just assume $arg1 is the message and hope for the best
175 else { 175 else {
176 return nagios_exit( UNKNOWN, $arg1, $rest ); 176 return nagios_exit( UNKNOWN, $arg1, $arg2 );
177 } 177 }
178} 178}
179 179