summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-04 16:09:56 -0700
committerJosh Blum <josh@joshknows.com>2010-08-04 16:09:56 -0700
commit3852ee1650701fb3a3fcab984a186055262011b7 (patch)
tree58aaba83a82ac53a9d35b3e31ca19be7ef11dd36 /host/lib/transport
parent70abdef8f6c6d24a99caf8d3668f32094b159903 (diff)
downloaduhd-3852ee1650701fb3a3fcab984a186055262011b7.tar.gz
uhd-3852ee1650701fb3a3fcab984a186055262011b7.tar.bz2
uhd-3852ee1650701fb3a3fcab984a186055262011b7.zip
uhd: added warning printer utility function
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/udp_zero_copy_asio.cpp12
1 files changed, 6 insertions, 6 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