Fix for issue http://api.nagios.com/tps/viewtask.php?task_id=4887 check_nrpe was exiting with 255 if my_connect() failed. Now it returns STATE_CRITICAL.
@@ -13,6 +13,7 @@ FIXES
- Replaced all instances of signal() with sigaction() + blocking (John Frickson)
- check_nrpe does not parse passed arguments correctly (John Frickson)
- NRPE should not start if cannot write pid file (John Frickson)
+- Fixed out-of-bounds error (return code 255) for some failures (John Frickson)
2.15 - 09/06/2013
-----------------
@@ -251,7 +251,7 @@ int main(int argc, char **argv){
/* try to connect to the host at the given port number */
if((sd=my_connect(server_name, &hostaddr, server_port, address_family,
bind_address)) < 0 ) {
- exit (255);
+ exit (STATE_CRITICAL);
}
else {
result=STATE_OK;