diff --git a/interfaces/innerkits/c/ipc/BUILD.gn b/interfaces/innerkits/c/ipc/BUILD.gn index 73b35620d2873d3fc1470e75946c48925638e0c1..24655a2c2bfeedc03bfe7e71dc127cd3f0dfa604 100644 --- a/interfaces/innerkits/c/ipc/BUILD.gn +++ b/interfaces/innerkits/c/ipc/BUILD.gn @@ -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" ] diff --git a/ipc/native/c/manager/src/ipc_process_skeleton.c b/ipc/native/c/manager/src/ipc_process_skeleton.c index a579cc4ec43a0be989058ebf7381da33d00af010..75303d9426b061c33ce68a88ff574cde1d3c817b 100644 --- a/ipc/native/c/manager/src/ipc_process_skeleton.c +++ b/ipc/native/c/manager/src/ipc_process_skeleton.c @@ -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 } \ No newline at end of file