diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-03 01:41:24 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-03 01:41:24 -0700 |
commit | b57c84b34bcdd6c66eb053695b83e6bd6c481774 (patch) | |
tree | 5307d6988c837018338416efe2bf9c83a3ffd418 /host/lib/transport/libusb1_zero_copy.cpp | |
parent | 7352c95037fa57d37dd7adc4c2ea6935006b56c8 (diff) | |
download | uhd-b57c84b34bcdd6c66eb053695b83e6bd6c481774.tar.gz uhd-b57c84b34bcdd6c66eb053695b83e6bd6c481774.tar.bz2 uhd-b57c84b34bcdd6c66eb053695b83e6bd6c481774.zip |
uhd: implemented udp zero copy asio with async calls
Diffstat (limited to 'host/lib/transport/libusb1_zero_copy.cpp')
-rw-r--r-- | host/lib/transport/libusb1_zero_copy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index e1cc8398c..c819302b6 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -277,7 +277,7 @@ libusb_transfer *usb_endpoint::get_lut_with_wait(double timeout){ /*********************************************************************** * USB zero_copy device class **********************************************************************/ -class libusb_zero_copy_impl : public usb_zero_copy { +class libusb_zero_copy_impl : public usb_zero_copy, public boost::enable_shared_from_this<libusb_zero_copy_impl> { public: typedef boost::shared_ptr<libusb_zero_copy_impl> sptr; @@ -378,7 +378,7 @@ managed_recv_buffer::sptr libusb_zero_copy_impl::get_recv_buff(double timeout){ else { return managed_recv_buffer::make_safe( boost::asio::const_buffer(lut->buffer, lut->actual_length), - boost::bind(&libusb_zero_copy_impl::release, this, lut) + boost::bind(&libusb_zero_copy_impl::release, shared_from_this(), lut) ); } } @@ -398,7 +398,7 @@ managed_send_buffer::sptr libusb_zero_copy_impl::get_send_buff(double timeout){ else { return managed_send_buffer::make_safe( boost::asio::mutable_buffer(lut->buffer, _send_xfer_size), - boost::bind(&libusb_zero_copy_impl::commit, this, lut, _1) + boost::bind(&libusb_zero_copy_impl::commit, shared_from_this(), lut, _1) ); } } |