diff --git a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp index 0f11031b5c4829619d234ceaad7f3f039bba1f6c..dbf9ae8ea9b78ed48987f64613cf2ff71c137a18 100644 --- a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp +++ b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp @@ -726,12 +726,13 @@ void DmAuthManager::UserSwitchEventCallback (void) jsonObj[FIELD_GROUP_TYPE] = GROUP_TYPE_PEER_TO_PEER_GROUP; std::string queryParams = jsonObj.dump(); std::vector groupList; - if (!hiChainConnector_->GetGroupInfo(queryParams, groupList)) { + int32_t ret = hiChainConnector_->GetGroupInfo(queryParams, groupList); + if (ret != DM_OK) { LOGE("failed to get device join groups"); return; } for (auto iter = groupList.begin(); iter != groupList.end(); iter++) { - int32_t ret = hiChainConnector_->DeleteGroup(iter->groupId); + ret = hiChainConnector_->DeleteGroup(iter->groupId); if (ret != DM_OK) { LOGE("fail to delete group"); }