diff options
author | Johnathan Mantey <johnathanx.mantey@intel.com> | 2018-12-10 15:49:34 -0800 |
---|---|---|
committer | Johnathan Mantey <johnathanx.mantey@intel.com> | 2019-02-04 11:52:28 -0800 |
commit | f92261dc449bc4579249101997da0648718dee2f (patch) | |
tree | 13b3872c5cb06c37a67e89b8365c1a7f1b75d507 /user_channel/channel_mgmt.cpp | |
parent | e19540e6d8e96e205978712a698e83f676553360 (diff) | |
download | phosphor-host-ipmid-f92261dc449bc4579249101997da0648718dee2f.tar.gz phosphor-host-ipmid-f92261dc449bc4579249101997da0648718dee2f.zip |
Update DBus initialization and use
The DBus instance variable is no longer a passed parameter to instance
methods. Instance methods can access the private DBus variable directly.
Change-Id: Id0c988802e5ad6c2757e7a243ee92331f447ac0d
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Diffstat (limited to 'user_channel/channel_mgmt.cpp')
-rw-r--r-- | user_channel/channel_mgmt.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp index 20e58b0..697219c 100644 --- a/user_channel/channel_mgmt.cpp +++ b/user_channel/channel_mgmt.cpp @@ -605,8 +605,8 @@ ipmi_ret_t ChannelConfig::setChannelAccessPersistData( "/" + channelData[chNum].chName; try { - if (0 != setDbusProperty(bus, networkIntfServiceName, - networkIntfObj, networkChConfigIntfName, + if (0 != setDbusProperty(networkIntfServiceName, networkIntfObj, + networkChConfigIntfName, privilegePropertyString, privStr)) { log<level::DEBUG>( @@ -972,7 +972,6 @@ int ChannelConfig::readChannelVolatileData() log<level::DEBUG>("Error in opening IPMI Channel data file"); return -EIO; } - try { // Fill in global structure @@ -1041,7 +1040,6 @@ int ChannelConfig::readChannelPersistData() log<level::DEBUG>("Error in opening IPMI Channel data file"); return -EIO; } - try { // Fill in global structure @@ -1238,8 +1236,7 @@ int ChannelConfig::checkAndReloadVolatileData() return ret; } -int ChannelConfig::setDbusProperty(sdbusplus::bus::bus& bus, - const std::string& service, +int ChannelConfig::setDbusProperty(const std::string& service, const std::string& objPath, const std::string& interface, const std::string& property, @@ -1268,8 +1265,7 @@ int ChannelConfig::setDbusProperty(sdbusplus::bus::bus& bus, return 0; } -int ChannelConfig::getDbusProperty(sdbusplus::bus::bus& bus, - const std::string& service, +int ChannelConfig::getDbusProperty(const std::string& service, const std::string& objPath, const std::string& interface, const std::string& property, @@ -1314,8 +1310,7 @@ int ChannelConfig::syncNetworkChannelConfig() std::string(networkIntfObjectBasePath) + "/" + channelData[chNum].chName; DbusVariant variant; - if (0 != getDbusProperty(bus, networkIntfServiceName, - networkIntfObj, + if (0 != getDbusProperty(networkIntfServiceName, networkIntfObj, networkChConfigIntfName, privilegePropertyString, variant)) { |