summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/udp_zero_copy_asio.cpp12
-rw-r--r--host/lib/transport/zero_copy.cpp6
2 files changed, 10 insertions, 8 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp
index bbbabf6d0..ee989ee2b 100644
--- a/host/lib/transport/udp_zero_copy_asio.cpp
+++ b/host/lib/transport/udp_zero_copy_asio.cpp
@@ -18,6 +18,7 @@
#include <uhd/transport/udp_zero_copy.hpp>
#include <uhd/transport/udp_simple.hpp> //mtu
#include <uhd/utils/assert.hpp>
+#include <uhd/utils/warning.hpp>
#include <boost/cstdint.hpp>
#include <boost/asio.hpp>
#include <boost/format.hpp>
@@ -161,12 +162,11 @@ template<typename Opt> static void resize_buff_helper(
else std::cout << boost::format(
"Current %s sock buff size: %d bytes"
) % name % actual_size << std::endl;
- if (actual_size < target_size) std::cerr << boost::format(
- "Warning:\n"
- " The %s buffer is smaller than the requested size.\n"
- " The minimum recommended buffer size is %d bytes.\n"
- " See the USRP2 application notes on buffer resizing.\n"
- ) % name % min_sock_buff_size << std::endl;
+ if (actual_size < target_size) uhd::print_warning(str(boost::format(
+ "The %s buffer is smaller than the requested size.\n"
+ "The minimum recommended buffer size is %d bytes.\n"
+ "See the USRP2 application notes on buffer resizing.\n"
+ ) % name % min_sock_buff_size));
}
//only enable on platforms that are happy with the large buffer resize
diff --git a/host/lib/transport/zero_copy.cpp b/host/lib/transport/zero_copy.cpp
index 42f69d77b..8a1cde694 100644
--- a/host/lib/transport/zero_copy.cpp
+++ b/host/lib/transport/zero_copy.cpp
@@ -54,12 +54,14 @@ private:
//! phony zero-copy recv interface implementation
struct phony_zero_copy_recv_if::impl{
+ impl(size_t max_buff_size) : max_buff_size(max_buff_size){
+ /* NOP */
+ }
size_t max_buff_size;
};
phony_zero_copy_recv_if::phony_zero_copy_recv_if(size_t max_buff_size){
- _impl = UHD_PIMPL_MAKE(impl, ());
- _impl->max_buff_size = max_buff_size;
+ _impl = UHD_PIMPL_MAKE(impl, (max_buff_size));
}
phony_zero_copy_recv_if::~phony_zero_copy_recv_if(void){