user_channel: Update the log of invalid channels
When the channel is invalid, redundant logs will be recorded:
```
Channel is not valid
Invalid channel
```
So the log in the isValidChannel method is deleted and the caller is
responsible for recording.
Change-Id: I190e9d428e9e6870e4cab4c571cf9ffd1e7caea1
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/user_channel/usercommands.cpp b/user_channel/usercommands.cpp
index 3e1b3ca..520501d 100644
--- a/user_channel/usercommands.cpp
+++ b/user_channel/usercommands.cpp
@@ -69,7 +69,8 @@
convertCurrentChannelNum(static_cast<uint8_t>(channel), ctx->channel);
if (!isValidChannel(chNum))
{
- lg2::debug("Set user access - Invalid channel request");
+ lg2::debug("Set user access - Invalid channel request: {CHANNEL}",
+ "CHANNEL", chNum);
return ipmi::response(invalidChannel);
}
if (getChannelSessionSupport(chNum) == EChannelSessSupported::none)