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/cipher_mgmt.cpp b/user_channel/cipher_mgmt.cpp
index c954f65..c0c0ae1 100644
--- a/user_channel/cipher_mgmt.cpp
+++ b/user_channel/cipher_mgmt.cpp
@@ -178,7 +178,9 @@
{
if (!isValidChannel(chNum))
{
- lg2::error("Invalid channel number: {CHANNEL}", "CHANNEL", chNum);
+ lg2::error(
+ "Get CS Privilege levels - Invalid channel number: {CHANNEL}",
+ "CHANNEL", chNum);
return ccInvalidFieldRequest;
}
@@ -194,7 +196,9 @@
{
if (!isValidChannel(chNum))
{
- lg2::error("Invalid channel number: {CHANNEL}", "CHANNEL", chNum);
+ lg2::error(
+ "Set CS Privilege levels - Invalid channel number: {CHANNEL}",
+ "CHANNEL", chNum);
return ccInvalidFieldRequest;
}