aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2015-08-12 12:19:20 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2015-08-12 12:19:20 -0700
commitbc9dd05988454428de1b6efd235d980b8eaa9afe (patch)
treef61a72cfb1cfa81305e75e11a1646a12ed4b63cf /host/lib/transport
parent95108f6f6ed6bf44fe38fc9e686fc9c5ae9c0e65 (diff)
downloaduhd-bc9dd05988454428de1b6efd235d980b8eaa9afe.tar.gz
uhd-bc9dd05988454428de1b6efd235d980b8eaa9afe.tar.bz2
uhd-bc9dd05988454428de1b6efd235d980b8eaa9afe.zip
C API cleanup, feature additions
* Cleaned up usage of handles vs. handle pointers * Store global string for last error thrown * Removed uhd::device_addr_t handle, added std::vector<std::string> handle
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp
index b6e7d869a..b67b36d0a 100644
--- a/host/lib/transport/libusb1_zero_copy.cpp
+++ b/host/lib/transport/libusb1_zero_copy.cpp
@@ -140,7 +140,7 @@ public:
const int ret = libusb_submit_transfer(_lut);
if (ret != LIBUSB_SUCCESS)
throw uhd::usb_error(ret, str(boost::format(
- "usb %s submit failed: %s") % _name % libusb_strerror((libusb_error)ret)));
+ "usb %s submit failed: %s") % _name % libusb_error_name(ret)));
}
template <typename buffer_type>
@@ -149,7 +149,7 @@ public:
if (wait_for_completion(timeout))
{
if (result.status != LIBUSB_TRANSFER_COMPLETED)
- throw uhd::usb_error(result.status, str(boost::format("usb %s transfer status: %s")
+ throw uhd::runtime_error(str(boost::format("usb %s transfer status: %d")
% _name % libusb_error_name(result.status)));
result.completed = 0;
return make(reinterpret_cast<buffer_type *>(this), _lut->buffer, (_is_recv)? result.actual_length : _frame_size);