summaryrefslogtreecommitdiff
path: root/src/components/transport_manager/src/usb/libusb/usb_connection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/transport_manager/src/usb/libusb/usb_connection.cc')
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_connection.cc4
1 files changed, 2 insertions, 2 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 e9ab2bae8e..212e6e0ec3 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
@@ -224,7 +224,7 @@ void UsbConnection::OnOutTransfer(libusb_transfer* transfer) {
device_uid_, app_handle_, current_out_message_, DataSendError());
PopOutMessage();
}
- if (!current_out_message_.valid()) {
+ if (current_out_message_.use_count() == 0) {
libusb_free_transfer(transfer);
out_transfer_ = NULL;
waiting_out_transfer_cancel_ = false;
@@ -242,7 +242,7 @@ TransportAdapter::Error UsbConnection::SendData(
return TransportAdapter::BAD_STATE;
}
sync_primitives::AutoLock locker(out_messages_mutex_);
- if (current_out_message_.valid()) {
+ if (current_out_message_.use_count() != 0) {
out_messages_.push_back(message);
} else {
current_out_message_ = message;