diff options
author | Michael Dickens <michael.dickens@ettus.com> | 2016-06-24 16:47:05 -0400 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-08-01 18:49:53 -0700 |
commit | 3681430062da117d2d2d4cb32f5b673c840fcc21 (patch) | |
tree | b31a2ffde5a1f51e7d434e7115b234137e88f4df /host | |
parent | 2b6e1c33f567f1c56b4becf4176bb40c6a95ee9a (diff) | |
download | uhd-3681430062da117d2d2d4cb32f5b673c840fcc21.tar.gz uhd-3681430062da117d2d2d4cb32f5b673c840fcc21.tar.bz2 uhd-3681430062da117d2d2d4cb32f5b673c840fcc21.zip |
usb: fix 'submit' to return 'int' since that is what 'libusb_control_transfer' returns; otherwise 'submit' is used with the correct types internally.
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/transport/usb_control.hpp | 14 | ||||
-rw-r--r-- | host/lib/transport/libusb1_control.cpp | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/host/include/uhd/transport/usb_control.hpp b/host/include/uhd/transport/usb_control.hpp index 23f35d7e8..c5d07bbd4 100644 --- a/host/include/uhd/transport/usb_control.hpp +++ b/host/include/uhd/transport/usb_control.hpp @@ -56,13 +56,13 @@ public: * \param timeout 4-byte (timeout, default is infinite wait) * \return number of bytes submitted or error code */ - virtual ssize_t submit(boost::uint8_t request_type, - boost::uint8_t request, - boost::uint16_t value, - boost::uint16_t index, - unsigned char *buff, - boost::uint16_t length, - boost::int32_t timeout = 0) = 0; + virtual int submit(boost::uint8_t request_type, + boost::uint8_t request, + boost::uint16_t value, + boost::uint16_t index, + unsigned char *buff, + boost::uint16_t length, + boost::int32_t timeout = 0) = 0; }; }} //namespace diff --git a/host/lib/transport/libusb1_control.cpp b/host/lib/transport/libusb1_control.cpp index 00c113163..1e6cc8cd3 100644 --- a/host/lib/transport/libusb1_control.cpp +++ b/host/lib/transport/libusb1_control.cpp @@ -36,13 +36,13 @@ public: _handle->claim_interface(interface); } - ssize_t submit(boost::uint8_t request_type, - boost::uint8_t request, - boost::uint16_t value, - boost::uint16_t index, - unsigned char *buff, - boost::uint16_t length, - boost::int32_t libusb_timeout = 0 + int submit(boost::uint8_t request_type, + boost::uint8_t request, + boost::uint16_t value, + boost::uint16_t index, + unsigned char *buff, + boost::uint16_t length, + boost::int32_t libusb_timeout = 0 ){ boost::mutex::scoped_lock lock(_mutex); return libusb_control_transfer(_handle->get(), |