summaryrefslogtreecommitdiffstats
path: root/user_channel
diff options
context:
space:
mode:
Diffstat (limited to 'user_channel')
-rw-r--r--user_channel/channel_layer.cpp5
-rw-r--r--user_channel/channel_layer.hpp9
-rw-r--r--user_channel/channel_mgmt.cpp33
-rw-r--r--user_channel/channel_mgmt.hpp8
4 files changed, 0 insertions, 55 deletions
diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp
index 122b3ea..c6866c2 100644
--- a/user_channel/channel_layer.cpp
+++ b/user_channel/channel_layer.cpp
@@ -58,11 +58,6 @@ bool isValidChannel(const uint8_t chNum)
return getChannelConfigObject().isValidChannel(chNum);
}
-uint8_t convertCurrentChannelNum(const uint8_t chNum)
-{
- return getChannelConfigObject().convertToChannelIndexNumber(chNum);
-}
-
bool isValidAuthType(const uint8_t chNum, const EAuthType& authType)
{
return getChannelConfigObject().isValidAuthType(chNum, authType);
diff --git a/user_channel/channel_layer.hpp b/user_channel/channel_layer.hpp
index 580c4ee..4eb51b7 100644
--- a/user_channel/channel_layer.hpp
+++ b/user_channel/channel_layer.hpp
@@ -295,15 +295,6 @@ static inline uint8_t convertCurrentChannelNum(const uint8_t chNum,
return chNum;
}
-/** @brief provides function to convert current channel number (0xE)
- *
- * @param[in] chNum - channel number as requested in commands.
- *
- * @return same channel number or proper channel number for current channel
- * number (0xE).
- */
-uint8_t convertCurrentChannelNum(const uint8_t chNum);
-
/** @brief to set channel access data
*
* @param[in] chNum - channel number
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);
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index b044f66..80bd6d9 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -224,14 +224,6 @@ class ChannelConfig
*/
CommandPrivilege convertToPrivLimitIndex(const std::string& value);
- /** @brief function to convert channel number to channel index
- *
- * @param[in] chNum - channel number
- *
- * @return channel index
- */
- uint8_t convertToChannelIndexNumber(const uint8_t chNum);
-
/** @brief function to write persistent channel configuration to config file
*
* @return 0 for success, -errno for failure.
OpenPOWER on IntegriCloud