sensordatahandler: enable scanning on assertion sensors

Currently, only readingData type sensors will call enableScanning to
indicate (in the IPMI response) that the sensor is enabled. From the
IPMI spec v2:

  System software must ignore any sensor that has the sensor scanning
  bit disabled - if system software didn’t disable the sensor.

- and ipmitool will report that the sensor is disabled if the response
does not have this bit set.

This means that only the readingData type sensors work at the moment.

This change calls enableScanning() for the assertion, readingAssertion,
and eventdata2 sensor types too.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Change-Id: Ifafdbf03bdf7690b9e263ab480ac79d27ed9b1a4
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 0d1182d..06f5f42 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -133,6 +133,8 @@
     sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
     GetSensorResponse response{};
 
+    enableScanning(&response);
+
     auto service = ipmi::getService(bus, interface, path);
 
     const auto& interfaceList = sensorInfo.propertyInterfaces;
@@ -169,6 +171,8 @@
     sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
     GetSensorResponse response{};
 
+    enableScanning(&response);
+
     auto service = ipmi::getService(bus, sensorInfo.sensorInterface,
                                     sensorInfo.sensorPath);