From d21c3d32416a58c2499990695a66d58ed2b62d87 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 8 Dec 2007 12:06:05 +1300 Subject: [PATCH] We now require that all version checks pass. --- bin/mythtv-status | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/mythtv-status b/bin/mythtv-status index 672a23a..d3e430a 100755 --- a/bin/mythtv-status +++ b/bin/mythtv-status @@ -221,7 +221,7 @@ my @blocks = ( 'name' => 'Total Disk Space', 'type' => 'xpath', 'xpath' => '//Status/MachineInfo/Storage', - 'protocol_version' => [ ">= 32" ], + 'protocol_version' => [ ">= 32", "<= 36" ], 'attrs' => [ qw/drive_total_total drive_total_used/ ], 'commify' => [ qw/drive_total_total drive_total_used/ ], 'template' => "Total space is __drive_total_total__ GB, with __drive_total_used__ GB used (__percent__)", @@ -457,9 +457,13 @@ sub process_xml { if (defined $block->{"${vers}_version"}) { my $result = undef; - # At least one of the version checks must pass. + # All the version checks must pass. for my $check (@{ $block->{"${vers}_version"} }) { - $result ||= eval ( "$version{$vers} $check" ); + my $res = eval ( "$version{$vers} $check" ); + + if (! defined $result || $res != 1) { + $result = $res; + } } return -- 2.30.2