diff --git a/ipc/native/src/core/include/process_skeleton.h b/ipc/native/src/core/include/process_skeleton.h index 415f1038f9589b724df425065b2bf8b6e5b4e813..66e3fbac53e8f50f2747619b7ce4c6fc188c5204 100644 --- a/ipc/native/src/core/include/process_skeleton.h +++ b/ipc/native/src/core/include/process_skeleton.h @@ -27,7 +27,7 @@ namespace OHOS { class ProcessSkeleton : public virtual RefBase { public: - static sptr GetInstance(); + static ProcessSkeleton* GetInstance(); sptr GetRegistryObject(); void SetRegistryObject(sptr &object); void SetSamgrFlag(bool flag); @@ -43,7 +43,7 @@ private: ProcessSkeleton() = default; ~ProcessSkeleton(); - static sptr instance_; + static ProcessSkeleton* instance_; static std::mutex mutex_; std::shared_mutex objMutex_; sptr registryObject_ = nullptr; diff --git a/ipc/native/src/core/source/ipc_object_proxy.cpp b/ipc/native/src/core/source/ipc_object_proxy.cpp index 02793619f5586f8b9b2cc492e511640c28eafb7a..93800835abc2c3b7292817a9372899ddb36cb261 100644 --- a/ipc/native/src/core/source/ipc_object_proxy.cpp +++ b/ipc/native/src/core/source/ipc_object_proxy.cpp @@ -523,7 +523,7 @@ int IPCObjectProxy::GetProtoInfo() MessageParcel data, reply; MessageOption option; int err = SendRequestInner(true, GET_PROTO_INFO, data, reply, option); - if (err != ERR_NONE) { + if (err != ERR_NONE && err != -EBADMSG) { ZLOGW(LABEL, "GET_PROTO_INFO transact return error = %{public}d", err); return IRemoteObject::IF_PROT_ERROR; } diff --git a/ipc/native/src/core/source/process_skeleton.cpp b/ipc/native/src/core/source/process_skeleton.cpp index b5a072ce5d1e32fccbede9c6017d207d6161c9c2..7aa2543c685df4d05ff52abd41f7fa901d211c55 100644 --- a/ipc/native/src/core/source/process_skeleton.cpp +++ b/ipc/native/src/core/source/process_skeleton.cpp @@ -22,10 +22,10 @@ namespace OHOS { static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC, "ProcessSkeleton" }; -sptr ProcessSkeleton::instance_ = nullptr; +ProcessSkeleton* ProcessSkeleton::instance_ = nullptr; std::mutex ProcessSkeleton::mutex_; -sptr ProcessSkeleton::GetInstance() +ProcessSkeleton* ProcessSkeleton::GetInstance() { if (instance_ == nullptr) { std::lock_guard lockGuard(mutex_);