ipc:modify resetipc

Signed-off-by: liubb_0516 <liubeibei8@huawei.com>
This commit is contained in:
liubb_0516 2022-05-08 11:17:40 +08:00
parent 7b28407a49
commit a7476f89e2
2 changed files with 8 additions and 0 deletions

View File

@ -175,6 +175,7 @@ if (ohos_kernel_type == "liteos_m") {
"//third_party/bounds_checking_function/:libsec_shared",
]
configs -= [ "//build/lite/config:clang_opt" ]
defines = [ "IPC_RESET_SKELETON" ]
}
SYSTEM_LEVEL = "small"
@ -217,6 +218,7 @@ if (ohos_kernel_type == "liteos_m") {
]
deps = [ "//foundation/communication/dsoftbus/sdk:softbus_client" ]
defines = [ "RPC_SOFTBUS_TRANS" ]
defines += [ "IPC_RESET_SKELETON" ]
if (enable_socket_trans) {
sources -= [ "$IPC_CORE_ROOT/rpc/trans_adapter/src/rpc_softbus_trans.c" ]

View File

@ -426,7 +426,13 @@ void DeleteDeathCallback(DeathCallback *deathCallback)
void ResetIpc(void)
{
RPC_LOG_INFO("ResetIpc called");
RemoteInvoker *invoker = GetRemoteInvoker();
if (invoker != NULL && invoker->InvokerResetIpc != NULL) {
(invoker->InvokerResetIpc)();
}
#ifdef IPC_RESET_SKELETON
DeleteIpcSkeleton(g_ipcSkeleton);
g_ipcSkeleton = NULL;
g_ipcSkeleton = IpcProcessSkeleton();
#endif
}