summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSubhendu Ghosh <sghosh@users.sourceforge.net>2002-08-01 05:06:53 +0000
committerSubhendu Ghosh <sghosh@users.sourceforge.net>2002-08-01 05:06:53 +0000
commitcf34ddfdeb9235440b847548a321b49eb6bb94f3 (patch)
tree65124d4bcc21d4ff5e2ad5975a372b96d5ce0b3b /plugins
parentc43abafb9465849a21c5b723c3048d9c8cbba523 (diff)
downloadmonitoring-plugins-cf34ddfdeb9235440b847548a321b49eb6bb94f3.tar.gz
re-patched exit state comparison
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@68 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_snmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 13e12ff8..eae52ca8 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -261,7 +261,7 @@ main (int argc, char **argv)
261 iresult = STATE_WARNING; 261 iresult = STATE_WARNING;
262 } 262 }
263 263
264 result = max (result, iresult); 264 result = max_state (result, iresult);
265 265
266 if (nlabels > 1 && i < nlabels && labels[i] != NULL) 266 if (nlabels > 1 && i < nlabels && labels[i] != NULL)
267 outbuff = ssprintf 267 outbuff = ssprintf
@@ -292,14 +292,14 @@ main (int argc, char **argv)
292 292
293 /* WARNING if output found on stderr */ 293 /* WARNING if output found on stderr */
294 if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) 294 if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
295 result = max (result, STATE_WARNING); 295 result = max_state (result, STATE_WARNING);
296 296
297 /* close stderr */ 297 /* close stderr */
298 (void) fclose (child_stderr); 298 (void) fclose (child_stderr);
299 299
300 /* close the pipe */ 300 /* close the pipe */
301 if (spclose (child_process)) 301 if (spclose (child_process))
302 result = max (result, STATE_WARNING); 302 result = max_state (result, STATE_WARNING);
303 303
304 if (nunits > 0) 304 if (nunits > 0)
305 printf ("%s %s -%s\n", label, state_text (result), outbuff); 305 printf ("%s %s -%s\n", label, state_text (result), outbuff);