From cdf31c47e1bf51c57d315a3722d09368371a0970 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Mon, 16 Oct 2017 11:56:47 +0100 Subject: [PATCH] Revert "bug: fail isPingable if fping errors" (#7496) * Revert "fix: Fixed clickatell alert transport (#7446)" This reverts commit 9774acd0551050d19490bbdfb44046b664c856a7. * Revert "newdevice: Added support for Eaton ATS devices (#7448)" This reverts commit 1318e5871c6eaf065efc98a2e60b1fa924a77b88. * Revert "newdevice: Updated Zhone MXK detection (#7488)" This reverts commit 81667b9e20a396df22e3602b803760ef657dba92. * Revert "docs: Added HipChat V2 WebUI Config Example (#7486)" This reverts commit a31eaa9839cce7bf1f02ee757a7698e2f9e39f23. * Revert "fix: Fail isPingable if fping errors (#7426)" This reverts commit 1998845f06b3fbbf2a3570b5bf7301fc446521cd. --- includes/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 50f21bea0c..e1ab08320d 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -604,7 +604,7 @@ function isPingable($hostname, $address_family = AF_INET, $attribs = array()) $fping_params .= ' -p ' . $config['fping_options']['millisec']; } $status = fping($hostname, $fping_params, $address_family); - if ($status['exitcode'] > 0 || $status['loss'] == 100) { + if ($status['loss'] == 100) { $response['result'] = false; } else { $response['result'] = true; @@ -1365,7 +1365,6 @@ function fping($host, $params, $address_family = AF_INET) $read .= fgets($pipes[1], 1024); } fclose($pipes[1]); - $proc_status = proc_get_status($process); proc_close($process); } @@ -1385,7 +1384,7 @@ function fping($host, $params, $address_family = AF_INET) $min = set_numeric($min); $max = set_numeric($max); $avg = set_numeric($avg); - $response = array('xmt'=>$xmt,'rcv'=>$rcv,'loss'=>$loss,'min'=>$min,'max'=>$max,'avg'=>$avg,'exitcode'=>$proc_status['exitcode']); + $response = array('xmt'=>$xmt,'rcv'=>$rcv,'loss'=>$loss,'min'=>$min,'max'=>$max,'avg'=>$avg); return $response; }