diff options
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/udp_zero_copy_asio.cpp | 3 | ||||
-rw-r--r-- | host/lib/transport/vrt_packet_handler.hpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp index 98451f188..bfbcf62d8 100644 --- a/host/lib/transport/udp_zero_copy_asio.cpp +++ b/host/lib/transport/udp_zero_copy_asio.cpp @@ -161,10 +161,13 @@ template<typename Opt> static void resize_buff_helper( ) % name % MIN_SOCK_BUFF_SIZE << std::endl; } + //only enable on platforms that are happy with the large buffer resize + #if defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32) //otherwise, ensure that the buffer is at least the minimum size else if (udp_trans->get_buff_size<Opt>() < MIN_SOCK_BUFF_SIZE){ resize_buff_helper<Opt>(udp_trans, MIN_SOCK_BUFF_SIZE, name); } + #endif /*defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32)*/ } udp_zero_copy::sptr udp_zero_copy::make( diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp index 6623957ac..fdcff24b8 100644 --- a/host/lib/transport/vrt_packet_handler.hpp +++ b/host/lib/transport/vrt_packet_handler.hpp @@ -146,6 +146,8 @@ namespace vrt_packet_handler{ const handle_overrun_t &handle_overrun, size_t vrt_header_offset_words32 ){ + metadata.error_code = uhd::rx_metadata_t::ERROR_CODE_NONE; + //perform a receive if no rx data is waiting to be copied if (state.size_of_copy_buffs == 0){ state.fragment_offset_in_samps = 0; @@ -171,7 +173,6 @@ namespace vrt_packet_handler{ metadata.has_time_spec = false; metadata.start_of_burst = false; metadata.end_of_burst = false; - metadata.error_code = uhd::rx_metadata_t::ERROR_CODE_NONE; } //extract the number of samples available to copy |