summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-03-02 22:54:37 +0530
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-03-25 02:00:38 +0000
commit55768e3548ef7476d4fdbe7be7a3ddb4d4896f14 (patch)
treefedf8522355038fa89e77647e81a702067ddbaed
parentbe376306918e84f411c1e4bdba15ec5b6a2219dc (diff)
downloadphosphor-host-ipmid-55768e3548ef7476d4fdbe7be7a3ddb4d4896f14.tar.gz
phosphor-host-ipmid-55768e3548ef7476d4fdbe7be7a3ddb4d4896f14.zip
Cleanup: Get rid of duplicate getChannelName()
Get rid of duplicate getChannelName function. Use the one with uint8_t channelNum. Tested-by: 1. Verified RMCP+ session establishement works with newly created user Change-Id: Iac22ec665ece97d4f9471cfb40220b472bdf01e8 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
-rw-r--r--user_channel/channel_layer.cpp2
-rw-r--r--user_channel/channel_layer.hpp2
-rw-r--r--user_channel/channel_mgmt.cpp7
-rw-r--r--user_channel/channel_mgmt.hpp8
4 files changed, 3 insertions, 16 deletions
diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp
index 0bd7ffe..34a596d 100644
--- a/user_channel/channel_layer.cpp
+++ b/user_channel/channel_layer.cpp
@@ -137,7 +137,7 @@ ipmi_ret_t getChannelEnabledAuthType(const uint8_t chNum, const uint8_t priv,
authType);
}
-std::string getChannelName(const int chNum)
+std::string getChannelName(const uint8_t chNum)
{
return getChannelConfigObject().getChannelName(chNum);
}
diff --git a/user_channel/channel_layer.hpp b/user_channel/channel_layer.hpp
index 3a172bc..5c82fba 100644
--- a/user_channel/channel_layer.hpp
+++ b/user_channel/channel_layer.hpp
@@ -328,6 +328,6 @@ ipmi_ret_t getChannelEnabledAuthType(const uint8_t chNum, const uint8_t priv,
*
* @return the LAN channel name (i.e. eth0)
*/
-std::string getChannelName(const int chNum);
+std::string getChannelName(const uint8_t chNum);
} // namespace ipmi
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index 9374931..3fb19b2 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -138,7 +138,7 @@ static std::array<std::string, PRIVILEGE_OEM + 1> privList = {
"priv-reserved", "priv-callback", "priv-user",
"priv-operator", "priv-admin", "priv-oem"};
-std::string ChannelConfig::getChannelName(const int chNum)
+std::string ChannelConfig::getChannelName(const uint8_t chNum)
{
if (!isValidChannel(chNum))
{
@@ -390,11 +390,6 @@ bool ChannelConfig::isValidAuthType(const uint8_t chNum,
return true;
}
-std::string ChannelConfig::getChannelName(const uint8_t chNum)
-{
- return channelData[chNum].chName;
-}
-
int ChannelConfig::getChannelActiveSessions(const uint8_t chNum)
{
// TODO: TEMPORARY FIX
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index cb0ea33..35bb494 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -232,14 +232,6 @@ class ChannelConfig
*/
int writeChannelVolatileData();
- /** @brief function to get channel name from channel number
- *
- * @param[in] chNum - channel number index
- *
- * @return network channel interface name
- */
- std::string getChannelName(const int chNum);
-
private:
uint32_t signalFlag = 0;
std::unique_ptr<boost::interprocess::named_recursive_mutex> channelMutex{
OpenPOWER on IntegriCloud