summaryrefslogtreecommitdiffstats
path: root/sensordatahandler.cpp
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-11-28 16:46:22 +0530
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-04 21:33:11 +0000
commitc6a571a45faaa533623993a5e6ea711906fd05b8 (patch)
treec943072ab2e370c65c4bfa134d77269462c0cce7 /sensordatahandler.cpp
parent3f2ed8e83690dffe1176212c6441bbe64e20ef92 (diff)
downloadphosphor-host-ipmid-c6a571a45faaa533623993a5e6ea711906fd05b8.tar.gz
phosphor-host-ipmid-c6a571a45faaa533623993a5e6ea711906fd05b8.zip
sensor: Modify the service lookup for set sensor command
With the current implementation of the generated code for the sensors, the object path corresponding to the sensor is present. But lookup was done again for the object path which was unnecessary. The current change would would only lookup the service implementing the object path and the interface corresponding to the sensor. Change-Id: I185bc49f6387428d62ab0e5cb8326497837aa67f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'sensordatahandler.cpp')
-rw-r--r--sensordatahandler.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 8240108..3aba53f 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -203,14 +203,12 @@ IpmiUpdateData makeDbusMsg(const std::string& updateInterface,
sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
using namespace std::string_literals;
- std::string dbusService;
- std::string dbusPath;
+ auto dbusService = getService(bus,
+ sensorInterface,
+ sensorPath);
- std::tie(dbusPath, dbusService) = getServiceAndPath(bus,
- sensorInterface,
- sensorPath);
return bus.new_method_call(dbusService.c_str(),
- dbusPath.c_str(),
+ sensorPath.c_str(),
updateInterface.c_str(),
command.c_str());
}
OpenPOWER on IntegriCloud