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/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index 29262cb..8c5a1bf 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -789,6 +789,9 @@
if (!isValidChannel(chNum))
{
+ lg2::debug(
+ "Set user payload access - Invalid channel request: {CHANNEL}",
+ "CHANNEL", chNum);
return ccInvalidFieldRequest;
}
if (!isValidUserId(userId))
@@ -839,6 +842,9 @@
{
if (!isValidChannel(chNum))
{
+ lg2::debug(
+ "Set user privilege access - Invalid channel request: {CHANNEL}",
+ "CHANNEL", chNum);
return ccInvalidFieldRequest;
}
if (!isValidUserId(userId))