sensor-mon: Check service on D-Bus at power on
If sensor-monitor has detected a threshold alarm when power is off, it
would log an error for that when the power turns on.
Add a check that the alarm interface is still on D-Bus before logging
the error, in case the sensor-daemon stopped running.
Alternatively, the code could listen for a NameOwnerChanged signal to
see if the daemon stopped, but then it would have to keep a map of
sensor names to service names and always keep it up to date. The chosen
method seems more straightforward and less error prone.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Idd6201e5b974a6e0d8f9960b39176374a2a01af8
1 file changed