mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 09:36:05 -04:00
Description:Log Rectification
Match-id-b68e484eda021ec7a8a104d3369588754490f2d1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
||||
@@ -44,13 +44,13 @@ namespace {
|
||||
|
||||
WhiteListUtil::WhiteListUtil()
|
||||
{
|
||||
DHLOGI("Ctor WhiteListUtil, addr: %p", this);
|
||||
DHLOGI("Ctor WhiteListUtil.");
|
||||
Init();
|
||||
}
|
||||
|
||||
WhiteListUtil::~WhiteListUtil()
|
||||
{
|
||||
DHLOGI("Dtor WhiteListUtil, addr: %p", this);
|
||||
DHLOGI("Dtor WhiteListUtil.");
|
||||
}
|
||||
|
||||
WhiteListUtil &WhiteListUtil::GetInstance(void)
|
||||
|
||||
@@ -377,7 +377,7 @@ void DistributedInputSinkTransport::OnSessionClosed(int32_t sessionId)
|
||||
void DistributedInputSinkTransport::OnBytesReceived(int32_t sessionId, const void *data, uint32_t dataLen)
|
||||
{
|
||||
DHLOGI("OnBytesReceived, sessionId: %d, dataLen:%d", sessionId, dataLen);
|
||||
if (sessionId < 0 || data == nullptr || dataLen <= 0) {
|
||||
if (sessionId < 0 || data == nullptr || dataLen <= 0 || dataLen > MSG_MAX_SIZE) {
|
||||
DHLOGE("OnBytesReceived param check failed");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1652,7 +1652,7 @@ int32_t DistributedInputSourceManager::RegisterDelWhiteListCallback(sptr<IDelWhi
|
||||
|
||||
int32_t DistributedInputSourceManager::RegisterInputNodeListener(sptr<InputNodeListener> listener)
|
||||
{
|
||||
DHLOGI("RegisterInputNodeListener, addr: %p", &listener);
|
||||
DHLOGI("RegisterInputNodeListener.");
|
||||
if (listener == nullptr) {
|
||||
DHLOGE("RegisterInputNodeListener callback is null.");
|
||||
return ERR_DH_INPUT_SERVER_SOURCE_MANAGER_NODE_LISTENER_CALLBACK_ERR;
|
||||
@@ -1664,7 +1664,7 @@ int32_t DistributedInputSourceManager::RegisterInputNodeListener(sptr<InputNodeL
|
||||
|
||||
int32_t DistributedInputSourceManager::UnregisterInputNodeListener(sptr<InputNodeListener> listener)
|
||||
{
|
||||
DHLOGI("UnregisterInputNodeListener, addr: %p", &listener);
|
||||
DHLOGI("UnregisterInputNodeListener.");
|
||||
if (listener == nullptr) {
|
||||
DHLOGE("UnregisterInputNodeListener callback is null.");
|
||||
return ERR_DH_INPUT_SERVER_SOURCE_MANAGER_NODE_LISTENER_CALLBACK_ERR;
|
||||
|
||||
@@ -772,7 +772,7 @@ bool DistributedInputSourceTransport::CheckRecivedData(const std::string& messag
|
||||
void DistributedInputSourceTransport::OnBytesReceived(int32_t sessionId, const void *data, uint32_t dataLen)
|
||||
{
|
||||
DHLOGI("OnBytesReceived, sessionId: %d, dataLen:%d", sessionId, dataLen);
|
||||
if (sessionId < 0 || data == nullptr || dataLen <= 0) {
|
||||
if (sessionId < 0 || data == nullptr || dataLen <= 0 || dataLen > MSG_MAX_SIZE) {
|
||||
DHLOGE("OnBytesReceived param check failed");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user