Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rrdtool_check_rrd_exists() by removing the broken remote check. #4081

Merged
merged 1 commit into from Aug 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions includes/rrdtool.inc.php
Expand Up @@ -210,20 +210,14 @@ function rrdtool($command, $filename, $options, $timeout = 0)

/**
* Checks if the rrd file exists on the server
* This will perform a remote check if using rrdcached and rrdtool >= 1.5
* This will perform a remote check if using rrdcached and rrdtool >= 1.5 (broken)
*
* @param $filename
* @return bool
*/
function rrdtool_check_rrd_exists($filename)
{
global $config;
if ($config['rrdcached'] && version_compare($config['rrdtool_version'], '1.5', '>=')) {
$chk = rrdtool('last', $filename, '', 30); // wait up to 30 seconds
return strpos(implode($chk), "$filename': No such file or directory") === false;
} else {
return is_file($filename);
}
return is_file($filename);
}

/**
Expand Down