mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 07:02:43 +00:00
update src/host/host_usb.cpp.
Signed-off-by: liupeng298 <liupeng298@huawei.com>
This commit is contained in:
parent
4fdb064df7
commit
db0c71abf7
@ -660,6 +660,12 @@ int HdcHostUSB::SendUSBRaw(HSession hSession, uint8_t *data, const int length)
|
||||
WRITE_LOG(LOG_FATAL, "Send usb failed, sid:%u ret:%d", hSession->sessionId, ret);
|
||||
CancelUsbIo(hSession);
|
||||
hSession->hUSB->hostBulkOut.isShutdown = true;
|
||||
HdcServer * serverClass = (HdcServer *)server;
|
||||
if (serverClass != nullptr && serverClass->clsServerForClient != nullptr) {
|
||||
HdcServerForClient *sfc = (HdcServerForClient *)serverClass->clsServerForClient;
|
||||
const string msg("[Fail]USB Device is disconnected.");
|
||||
sfc->EchoToAllChannelsViaSessionId(hSession->sessionId, msg);
|
||||
}
|
||||
server->FreeSession(hSession->sessionId);
|
||||
}
|
||||
--hSession->ref;
|
||||
|
Loading…
Reference in New Issue
Block a user