From c537233daf14d77ac871cc81e0400c4460262bde Mon Sep 17 00:00:00 2001 From: chen Date: Thu, 28 Apr 2022 09:08:38 +0800 Subject: [PATCH] add log for setcontextobject Signed-off-by: chen Change-Id: I6bc8bf430da59347e7aebd4669bc77472e4410d7 --- services/samgr/native/source/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/samgr/native/source/main.cpp b/services/samgr/native/source/main.cpp index 820b6b8d..b3a5cbfa 100644 --- a/services/samgr/native/source/main.cpp +++ b/services/samgr/native/source/main.cpp @@ -29,7 +29,10 @@ int main(int argc, char *argv[]) OHOS::sptr manager = OHOS::SystemAbilityManager::GetInstance(); manager->Init(); OHOS::sptr serv = manager->AsObject(); - IPCSkeleton::SetContextObject(serv); + if (!IPCSkeleton::SetContextObject(serv)) { + HILOGE("set context object fail, ipc error and return!"); + return -1; + } HILOGI("start System Ability Manager Loop"); OHOS::IPCSkeleton::JoinWorkThread(); -- Gitee