diff options
Diffstat (limited to 'sensorhandler.cpp')
-rw-r--r-- | sensorhandler.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sensorhandler.cpp b/sensorhandler.cpp index ee62e17..609fdfd 100644 --- a/sensorhandler.cpp +++ b/sensorhandler.cpp @@ -619,8 +619,10 @@ void getSensorThresholds(uint8_t sensorNum, info.sensorPath, warningThreshIntf); - double warnLow = warnThresholds["WarningLow"].get<int64_t>(); - double warnHigh = warnThresholds["WarningHigh"].get<int64_t>(); + double warnLow = mapbox::util::apply_visitor(ipmi::VariantToDoubleVisitor(), + warnThresholds["WarningLow"]); + double warnHigh = mapbox::util::apply_visitor( + ipmi::VariantToDoubleVisitor(), warnThresholds["WarningHigh"]); if (warnLow != 0) { @@ -644,8 +646,10 @@ void getSensorThresholds(uint8_t sensorNum, service, info.sensorPath, criticalThreshIntf); - double critLow = critThresholds["CriticalLow"].get<int64_t>(); - double critHigh = critThresholds["CriticalHigh"].get<int64_t>(); + double critLow = mapbox::util::apply_visitor(ipmi::VariantToDoubleVisitor(), + critThresholds["CriticalLow"]); + double critHigh = mapbox::util::apply_visitor( + ipmi::VariantToDoubleVisitor(), critThresholds["CriticalHigh"]); if (critLow != 0) { |