提交 55c7a9e9 编写于 作者: Z zhangboyuan

ipc告警清理

Signed-off-by: Nzhangboyuan <zhangboyuan1@huawei.com>
上级 89eadb2d
......@@ -40,7 +40,6 @@ ohos_shared_library("ipc_core") {
"$IPC_CORE_ROOT/src/core/source/databus_session_callback.cpp",
"$IPC_CORE_ROOT/src/core/source/dbinder_callback_stub.cpp",
"$IPC_CORE_ROOT/src/core/source/dbinder_session_object.cpp",
"$IPC_CORE_ROOT/src/core/source/ipc_core_so_init.cpp",
"$IPC_CORE_ROOT/src/core/source/ipc_file_descriptor.cpp",
"$IPC_CORE_ROOT/src/core/source/ipc_object_proxy.cpp",
"$IPC_CORE_ROOT/src/core/source/ipc_object_stub.cpp",
......
......@@ -39,11 +39,12 @@ public:
virtual ~ErrorBase() = default;
inline const std::string &GetErrorDesc(uint32_t error);
virtual ErrorMap &GetErrorMap() = 0;
static constexpr const char *unknowCommand = "UNKNOWN COMMAND";
};
inline const std::string &ErrorBase::GetErrorDesc(uint32_t error)
{
static constexpr const char *unknowCommand = "UNKNOWN COMMAND";
ErrorMap::iterator found = GetErrorMap().find(error);
if (found == GetErrorMap().end()) {
return unknowCommand;
......
/*
* Copyright (C) 2023 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string>
#include <dlfcn.h>
#include "log_tags.h"
#include "ipc_debug.h"
namespace OHOS {
static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_RPC, "ipc_core_so_init" };
extern "C" __attribute__((constructor)) void init(void) {
std::string path = std::string("libclang_rt.ubsan_standalone.so");
void *handle = dlopen(path.c_str(), RTLD_NOW);
if (handle == nullptr) {
ZLOGE(LOG_LABEL, "ipc_core.so init fail");
}
}
} // namespace OHOS
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册