summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsniukalov <sniukaov@luxoft.com>2020-04-17 12:08:09 +0300
committersniukalov <sniukaov@luxoft.com>2020-04-17 12:08:09 +0300
commite4e9c5b06bcb64c726a3ebac7d330a5e36f2a37a (patch)
tree97853a998927eee179b98a10a0eb06e7c00fbaa9
parent530c37342f3bd729a2569460aef83ed622a5f9e1 (diff)
downloadsdl_core-fix/deadlock_during_reconnect_usb.tar.gz
fixup! Rework the use of AbortConnection for a usb connectionfix/deadlock_during_reconnect_usb
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_connection.cc8
1 files 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;
}