mirror of
https://gitee.com/openharmony/usb_usb_manager
synced 2024-11-27 00:41:39 +00:00
代码差异整改
Signed-off-by: 秦际红 <qinjihong111@huawei.com>
This commit is contained in:
parent
26d5014222
commit
45db1f3837
@ -1033,6 +1033,7 @@ int32_t UsbService::RequestCancel(uint8_t busNum, uint8_t devAddr, uint8_t inter
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "UsbService::usbd_ is nullptr");
|
||||
return UEC_SERVICE_INVALID_VALUE;
|
||||
}
|
||||
|
||||
return usbd_->RequestCancel(dev, pipe);
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
@ -1845,6 +1846,7 @@ int32_t UsbService::UnRegBulkCallback(const UsbDev &devInfo, const UsbPipe &pipe
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "UsbService::usbd_ is nullptr");
|
||||
return UEC_SERVICE_INVALID_VALUE;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(hdiCbMutex_);
|
||||
hdiCb_ = nullptr;
|
||||
int32_t ret = usbd_->UnRegBulkCallback(devInfo, pipe);
|
||||
@ -1871,6 +1873,7 @@ int32_t UsbService::BulkRead(const UsbDev &devInfo, const UsbPipe &pipe, sptr<As
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "UsbService::usbd_ is nullptr");
|
||||
return UEC_SERVICE_INVALID_VALUE;
|
||||
}
|
||||
|
||||
int32_t ret = usbd_->BulkRead(devInfo, pipe, ashmem);
|
||||
if (ret != UEC_OK) {
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "BulkRead error ret:%{public}d", ret);
|
||||
@ -1895,6 +1898,7 @@ int32_t UsbService::BulkWrite(const UsbDev &devInfo, const UsbPipe &pipe, sptr<A
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "UsbService::usbd_ is nullptr");
|
||||
return UEC_SERVICE_INVALID_VALUE;
|
||||
}
|
||||
|
||||
int32_t ret = usbd_->BulkWrite(devInfo, pipe, ashmem);
|
||||
if (ret != UEC_OK) {
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "BulkWrite error ret:%{public}d", ret);
|
||||
@ -1914,6 +1918,7 @@ int32_t UsbService::BulkCancel(const UsbDev &devInfo, const UsbPipe &pipe)
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "UsbService::usbd_ is nullptr");
|
||||
return UEC_SERVICE_INVALID_VALUE;
|
||||
}
|
||||
|
||||
int32_t ret = usbd_->BulkCancel(devInfo, pipe);
|
||||
if (ret != UEC_OK) {
|
||||
USB_HILOGE(MODULE_USB_SERVICE, "BulkCancel error ret:%{public}d", ret);
|
||||
|
@ -1179,8 +1179,8 @@ int32_t UsbServerStub::DoManageInterfaceType(MessageParcel &data, MessageParcel
|
||||
{
|
||||
int32_t count;
|
||||
READ_PARCEL_WITH_RET(data, Int32, count, UEC_SERVICE_READ_PARCEL_ERROR);
|
||||
if (count > MAX_EDM_LIST_SIZE) {
|
||||
USB_HILOGE(MODULE_USBD, "count:%{public}d", count);
|
||||
if (count > MAX_EDM_LIST_SIZE || count < 0) {
|
||||
USB_HILOGE(MODULE_USBD, "EDM list size count:%{public}d", count);
|
||||
return UEC_SERVICE_READ_PARCEL_ERROR;
|
||||
}
|
||||
bool disable = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
Loading…
Reference in New Issue
Block a user