aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-14 20:11:01 -0700
committerJosh Blum <josh@joshknows.com>2010-07-14 20:11:01 -0700
commitdfc0da5aa95a35b8ace4eb8b46986e0576c62337 (patch)
tree0658c273c68c89c51fe866c95090cdda4de3c715
parentbf1e3de7ae69aa2f3ba7671ce1e4b85073e567e8 (diff)
downloaduhd-dfc0da5aa95a35b8ace4eb8b46986e0576c62337.tar.gz
uhd-dfc0da5aa95a35b8ace4eb8b46986e0576c62337.tar.bz2
uhd-dfc0da5aa95a35b8ace4eb8b46986e0576c62337.zip
uhd: fix for vrt packet handler commit size
-rw-r--r--host/lib/transport/vrt_packet_handler.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp
index fdcff24b8..bd76cbb8f 100644
--- a/host/lib/transport/vrt_packet_handler.hpp
+++ b/host/lib/transport/vrt_packet_handler.hpp
@@ -324,7 +324,8 @@ namespace vrt_packet_handler{
);
//commit the samples to the zero-copy interface
- if (send_buffs[i]->commit(if_packet_info.num_packet_words32*sizeof(boost::uint32_t)) < ssize_t(num_samps)){
+ size_t num_bytes_total = (vrt_header_offset_words32+if_packet_info.num_packet_words32)*sizeof(boost::uint32_t);
+ if (send_buffs[i]->commit(num_bytes_total) < ssize_t(num_bytes_total)){
std::cerr << "commit to send buffer returned less than commit size" << std::endl;
}
}