From e4e9c5b06bcb64c726a3ebac7d330a5e36f2a37a Mon Sep 17 00:00:00 2001 From: sniukalov Date: Fri, 17 Apr 2020 12:08:09 +0300 Subject: fixup! Rework the use of AbortConnection for a usb connection --- src/components/transport_manager/src/usb/libusb/usb_connection.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/src/components/transport_manager/src/usb/libusb/usb_connection.cc index 23c440101c..4b7b22394d 100644 --- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc +++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc @@ -179,7 +179,9 @@ TransportAdapter::Error UsbConnection::PostOutTransfer() { out_transfer_ = libusb_alloc_transfer(0); if (nullptr == out_transfer_) { LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed"); - LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: 0 == out_transfer_"); + LOG4CXX_TRACE(logger_, + "exit with TransportAdapter::BAD_STATE. Condition: nullptr " + "== out_transfer_"); return TransportAdapter::BAD_STATE; } libusb_fill_bulk_transfer(out_transfer_, @@ -196,11 +198,11 @@ TransportAdapter::Error UsbConnection::PostOutTransfer() { logger_, "libusb_submit_transfer failed: " << libusb_error_name(libusb_ret)); LOG4CXX_TRACE(logger_, - "exit with FALSE. Condition: " + "exit with TransportAdapter::FAIL. Condition: " << "LIBUSB_SUCCESS != libusb_fill_bulk_transfer"); return TransportAdapter::FAIL; } - LOG4CXX_TRACE(logger_, "exit with TRUE"); + LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK"); return TransportAdapter::OK; } -- cgit v1.2.1