mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 15:12:24 +00:00
Optimize the processing logic for sending messages during task execution. After the session has been released, intercept the information to be sent by the task and no longer send it
Signed-off-by: wenlong_12 <wenlong12@huawei.com> Change-Id: I86507fab6891352854662c87492c01f271034e35
This commit is contained in:
parent
b59df0dfe9
commit
4c6c00b6b2
@ -65,6 +65,11 @@ bool HdcTaskBase::SendToAnother(const uint16_t command, uint8_t *bufPtr, const i
|
||||
return true;
|
||||
} else {
|
||||
HdcSessionBase *sessionBase = reinterpret_cast<HdcSessionBase *>(taskInfo->ownerSessionClass);
|
||||
if (sessionBase->IsSessionDeleted(taskInfo->sessionId)) {
|
||||
WRITE_LOG(LOG_FATAL, "SendToAnother session is deleted channelId:%u command:%u",
|
||||
taskInfo->channelId, command);
|
||||
return false;
|
||||
}
|
||||
return sessionBase->Send(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size) > 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user