From e531f936e6ffa645a944b360a51f82004c6cdfcb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 3 Mar 2010 02:00:00 -0800 Subject: memcpy size fix, change to some send logic --- host/lib/usrp/usrp2/io_impl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 9299bb04a..642b6b08b 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -198,11 +198,12 @@ size_t usrp2_impl::send( ); //copy in the vrt header (yes we left space) - std::memcpy(items - num_header_words32, vrt_hdr, num_header_words32); - asio::const_buffer send_buff(items - num_header_words32, num_packet_words32*sizeof(uint32_t)); + items -= num_header_words32; + std::memcpy(items, vrt_hdr, num_header_words32*sizeof(uint32_t)); //send and return number of samples - _data_transport->send(send_buff); return num_samps; + _data_transport->send(asio::buffer(items, num_packet_words32*sizeof(uint32_t))); + return num_samps; } /*********************************************************************** -- cgit v1.2.3