diff options
author | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-05-15 08:45:00 -0700 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-06-14 16:59:29 +0000 |
commit | 0b979b61c12ffe6ab8a27acf8ad2a0165d687195 (patch) | |
tree | bfc896515978d25a972a5ec9a78291acf3a2cbdf /user_channel/channel_mgmt.cpp | |
parent | 6fd812d17402f1c8db242ea8b454fe896711ba71 (diff) | |
download | phosphor-host-ipmid-0b979b61c12ffe6ab8a27acf8ad2a0165d687195.tar.gz phosphor-host-ipmid-0b979b61c12ffe6ab8a27acf8ad2a0165d687195.zip |
Remove unused function convertCurrentChannelNum(uint8_t)
convertCurrentChannelNum(uint8_t) was deprecated in favor of an
actual working implementation. It was stubbed out for a while to
provide a broken, backwards-compatible interface, but now that all
of those have been removed in favor of the new interface that
actually works: convertCurrentChannelNum(uint8_t, uint8_t), the
old function can be removed.
Tested: Builds without any errors (means the old interface was removed)
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Change-Id: I3796e890c7cc34333116b71a97db268abf5f0e89
Diffstat (limited to 'user_channel/channel_mgmt.cpp')
-rw-r--r-- | user_channel/channel_mgmt.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp index 6559a43..008ffd9 100644 --- a/user_channel/channel_mgmt.cpp +++ b/user_channel/channel_mgmt.cpp @@ -786,39 +786,6 @@ EChannelProtocolType return static_cast<EChannelProtocolType>(it->second); } -uint8_t ChannelConfig::convertToChannelIndexNumber(const uint8_t chNum) -{ - - // TODO: There is limitation in current design. we cannot detect exact - // LAN interface(eth0 or eth1) so Implementation may be updated - // when there is any design update to figure out all the interfaces - // independently based on the message. - - static uint8_t curChannel = 0xFF; - - if (curChannel == 0xFF) - { - auto it = interfaceMap.find(getInterfaceIndex()); - if (it == interfaceMap.end()) - { - log<level::ERR>("Invalid Interface type ", - entry("InterfaceIndex: %d", getInterfaceIndex())); - throw std::invalid_argument("Invalid interface type."); - } - - for (auto& channel : channelData) - { - std::string& interfaceName = it->second; - if (channel.chName == interfaceName) - { - curChannel = channel.chID; - break; - } - } - } - return ((chNum == currentChNum) ? curChannel : chNum); -} - Json ChannelConfig::readJsonFile(const std::string& configFile) { std::ifstream jsonFile(configFile); |