diff options
| author | Josh Blum <josh@joshknows.com> | 2010-07-05 16:35:44 -0700 |
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2010-07-05 16:35:44 -0700 |
| commit | c2039a8c92561fa5532d87cb9d875a3ad7b875c1 (patch) | |
| tree | 231b1c4cc8d4576f857177f5f4e190aed9fcaca8 /host/lib/transport/vrt_packet_handler.hpp | |
| parent | 8047f25c601c43d6941cd0d094360a56917917c8 (diff) | |
| download | uhd-c2039a8c92561fa5532d87cb9d875a3ad7b875c1.tar.gz uhd-c2039a8c92561fa5532d87cb9d875a3ad7b875c1.tar.bz2 uhd-c2039a8c92561fa5532d87cb9d875a3ad7b875c1.zip | |
uhd: code tweaks, extra error condition for vrt unpack
Diffstat (limited to 'host/lib/transport/vrt_packet_handler.hpp')
| -rw-r--r-- | host/lib/transport/vrt_packet_handler.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp index 177239509..68edeb1e1 100644 --- a/host/lib/transport/vrt_packet_handler.hpp +++ b/host/lib/transport/vrt_packet_handler.hpp @@ -87,7 +87,7 @@ namespace vrt_packet_handler{ uhd::transport::vrt::if_packet_info_t if_packet_info; for (size_t i = 0; i < state.width; i++){ const boost::uint32_t *vrt_hdr = state.managed_buffs[i]->cast<const boost::uint32_t *>() + vrt_header_offset_words32; - if_packet_info.num_packet_words32 = num_packet_words32; + if_packet_info.num_packet_words32 = num_packet_words32 - vrt_header_offset_words32; vrt_unpacker(vrt_hdr, if_packet_info); //handle the packet count / sequence number @@ -163,7 +163,7 @@ namespace vrt_packet_handler{ ); //update the rx copy buffer to reflect the bytes copied - state.copy_buffs[i] = reinterpret_cast<const boost::uint8_t *>(state.copy_buffs[i]) + bytes_to_copy; + state.copy_buffs[i] += bytes_to_copy; } //update the copy buffer's availability state.size_of_copy_buffs -= bytes_to_copy; |
