aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-03 02:00:00 -0800
committerJosh Blum <josh@joshknows.com>2010-03-03 02:00:00 -0800
commite531f936e6ffa645a944b360a51f82004c6cdfcb (patch)
treeb6b8d07743078d01eb33a5fd4bfb17326abb036b /host
parentbb8417526c14bd49192c159cbdc52f5ea0063784 (diff)
downloaduhd-e531f936e6ffa645a944b360a51f82004c6cdfcb.tar.gz
uhd-e531f936e6ffa645a944b360a51f82004c6cdfcb.tar.bz2
uhd-e531f936e6ffa645a944b360a51f82004c6cdfcb.zip
memcpy size fix, change to some send logic
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp7
1 files 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;
}
/***********************************************************************